Linuxdays 2005, Samba Tutorial: Alain Knaff
Linuxdays 2005, Samba Tutorial: Alain Knaff
Linuxdays 2005, Samba Tutorial: Alain Knaff
Alain Knaff
Summary
1. Installing 2. Basic config (defining shares, ...) 3. Operating as a PDC 4. Password synchronization 5. Access control 6. Samba variables 7. Advanced printing 8. LDAP Backend 9. Misc gimmicks
1. Installing (smb.conf)
Samba 3.0.10-1 apt-get install samba apt-get install smbclient Slapd 2.1.30-3 GQ 1.0beta1 apt-get install gq
Drive letter for home directory: logon drive = "H:" Home directory share:[homes] writable = yes
PDC: example
[global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = belgium domain logons = yes security = user encrypt passwords = yes add machine script = /usr/sbin/useradd -d / -G -g 100 -s /bin/false %u printing = cups cups options = "raw,media=a4" load printers = yes username map = /etc/samba/user.map ... # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server wins support = yes
4. Password synchronization
Global settings Unix pass follows windows: /etc/pam.d/samba Windows pass follows Unix: /etc/pam.d/passwd
Debian solutions:
5. Access control
By user By IP Controlling Unix rights once access is granted
Access control: by IP
hosts deny hosts allow allow takes precedence
6. Samba variables
%U %u %G %g %H %m %I %a %L user name requested user name granted (after force) primary group of %U primary group of %u home directory of %u NetBIOS name of client machine IP of client Win variant of client (WfWg, Win95, WinNT, Win2k, ...) name of the server
8. LDAP backend
Goal: Store user information in LDAP Useful for if user database is huge changes frequently must be distributed across several hosts Allows to specify some settings per user, which would normally be global: profile path startup script
9. Other gimmicks
User monitoring Time service Veto/hide files Include/override config files