Samba setup
Server setup | |
← Previous | Next → |
Git | Log stats |
Samba allows me to grant access to Linux shares from Windows machines. This setup is done on the desktop machine.
- Install the packages you need
root@desktop:~# apt-get install samba
- Modify
/etc/samba/smb.conf
(note that you'll have to skip around the file to find all the settings)
[global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = myworkgroup ####### Authentication ####### # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. security = user # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. unix password sync = no #======================= Share Definitions ======================= # Un-comment the following (and tweak the other settings below to suit) # to enable the default home directory shares. This will share each # user's home directory as \\server\username [homes] comment = Home Directories browseable = yes # By default, the home directories are exported read-only. Change the # next parameter to 'no' if you want to be able to write to them. read only = no # By default, \\server\username shares can be connected to by anyone # with access to the samba server. Un-comment the following parameter # to make sure that only "username" can connect to \\server\username # This might need tweaking when using external authentication schemes valid users = %S
- For each user, create the password for that user
root@desktop:~# smbpasswd -a linuxusername
- Restart Samba:
root@desktop:~# /etc/init.d/samba restart
Note that each user will need to log into the Samba server machine directly (i.e. via the GUI at that machine) to go through the 'first login mandatory password reset' rigmarole. Once that's done, they'll be able to use their Samba share.
On the Windows side, the user should point Windows Explorer at \\server\username
and give the Samba username and password to log in. They can then map a new network drive to the Samba directory if they want.
See also
Here are a few pages that are useful guides or provide background and context.
- Install Samba Server on Ubuntu, from the Howto Geek.
- Share Ubuntu Home Directories using Samba, again from the Howto Geek.
- Samba troubleshooting guide (pdf)