On Friday 25 September 2009 12:06:50 pm Bob Williams wrote:
Can anyone suggest what I need to do to get samba running? Once I've got that far, I'm happy to play around with /etc/samba/smb.conf
Thanks,
Bob
Sure Bob, It's simple. Here is an outline with a few tricks: 1) add each user that will access the samba shares to smbpasswd: smbpasswd -a username (tip: use the same password as the windows password for the user and the login is usually automatic) 2) set up a directory you will share on the server. I use: /home/samba (make sure the permissions allow the user to read! For directories that is a minimum of r+x or 5 as in 0755) I usually set the directories I want to have under /home/samba and give /home/samba 0755 permission to prevent users from writing in the samba directory itself, then make all subdirectories 0775 so users have write permission and can add subdirectories, etc..) If you are using groups to allow access, you can tighten permission on the subdirectories to 0770. 3) Install a simple /etc/samba/smb.conf, Just copy and paste the following, change as necessary. (You can comment out the print-pdf share if you don't want to use it) Make sure you change the workgroup name to match your windows workgroup and change the wins server IP to your linux box IP (the server). Also, obviously, change the user and group names :-) [global] workgroup = rb_law server string = Samba %v disable spoolss = yes printcap name = cups cups options = raw map to guest = Bad User include = /etc/samba/dhcp.conf usershare allow guests = No security = user admin users = david smb ports = 139 hosts allow = 192.168.5. 127. ; Specify your subnets and localhost. domain logons = yes wins server = 192.168.6.17 restrict anonymous = no passwd chat debug = yes domain master = no logon home = %5C%5C%25N%5C%25U smb passwd file = file: pid directory = file: logon path = %5C%5C%25N%5C%25U%5Cprofile lock directory = file: private dir = file: [homes] comment = Home Directories browseable = No read only = No inherit acls = Yes [samba] comment = Your Shared Files. path = /home/samba valid users = @chooseyourgroup, andanyusernames force user = david force group = skyline admin users = david ; Make yourself an admin user browseable = Yes writeable = Yes inherit permissions = yes ; ; use with caution. This gives you root access from windows. I limit this to myself. ; [config] comment = Alchemy Config path = /home/samba valid users = david force user = root force group = root browseable = no read only = no [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No ; ; This is a trick to create a print-to-pdf function on your server that uses ; ps2pdf. On windows just browse to your server and install the printer. ; When prompted for a driver, choose a color postscript driver. The ; HP Color LaserJet 8500 PS driver works great. The Apple driver work great too. ; ; Put the print-pdf script in /usr/share/samba/scripts/ ; [pdf-gen] path = /var/tmp guest ok = No printable = Yes comment = PDF Generator print-pdf printing = bsd printcap name = cups print command = /usr/share/samba/scripts/print-pdf "%s" "%H/pdf" "//%L/%u" "%m" "%I" "%J" & lpq command = /bin/true 4) Start/restart the samba nmbd and smbd daemons: # rcnmb restart # rcsmb restart Then configure them to start at boot: # chkconfig nmb on # chkconfig smb on 5) Either browse with windows explorer to map the shares or from the command prompt in windows do: net use f: \\servername\samba 6) That's it, post back if you get stuck. Get the print-pdf script at: http://www.3111skyline.com/download/linux/scripts/print-pdf I probably have more notes for samba here: http://www.3111skyline.com/linux/openSuSE-server.php#samba Good luck! -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org