Samba

From Cheatsheet

Jump to: navigation, search

Lets you share Windows files and printers on a Linux box, which looks to windows like a windows box. This setup is on Debian/Ubuntu, YMMV

install

 apt-get install samba samba-client

configure

 vi /etc/samba/smb.conf
 ============== Share Definitions ================
 [whateveruser]
       path=/pathyouwantthemtoaccess/
       browseable=yes
       writeable=yes
       valid users=whateveruser
       admin users=admin_guy
       create mask=0775
       directory mask=0775
 useradd whateveruser
 smbpasswd -a whateveruser
 mkdir /pathyouwantthemtoaccess
 chown whateveruser.whateveruser /pathyouwantthemtoaccess
 /etc/init.d/samba reload

check config

 testparm
 /etc/init.d/samba restart

add users

 useradd someguy
 smbpasswd -a someguy

test connectivity

 smbclient -L //samba.i.p. -U someguy