[opensuse] How to get samba working?
Hi, I'm trying to get a really simple samba server set up here, so that my two Windows laptops can view photographs on my openSUSE 11.1 with KDE 4.3 desktop. All the machines are members of the same workgroup. The windows machines can see each other, and I can see the windows machines from KDE3 konqueror (although I'm using the KDE4 desktop) with the smb:// protocol. Although the samba HOWTO.pdf is great for going through the configuration, I think I have a more basic problem with the samba executables. The following CLI messages may mean something to someone... barrowhillfarm:~ # smbclient //barrowhillfarm/robert Connection to barrowhillfarm failed (Error NT_STATUS_CONNECTION_REFUSED) barrowhillfarm:~ # smbclient -L barrowhillfarm Connection to barrowhillfarm failed (Error NT_STATUS_CONNECTION_REFUSED) barrowhillfarm:~ # nmbd restart Aborted (core dumped) barrowhillfarm:~ # rcnmb restart Shutting down Samba NMB daemon Warning: daemon not running. done Starting Samba NMB daemon startproc: signal catched /usr/sbin/nmbd: Aborted failed barrowhillfarm:~ # rcsmb restart Shutting down Samba SMB daemon Warning: daemon not running. done Starting Samba SMB daemon done barrowhillfarm:~ # smbd -b | grep LOCKDIR LOCKDIR: /var/lib/samba barrowhillfarm:~ # smbd -b | grep PRIVATE_DIR PRIVATE_DIR: /etc/samba There seems to be a problem with the nmb module? In Yast > Runlevel services, both nmbd and smbd end up with an asterisk against them when I try to enable them. I have the following packages installed, from the repo-update repository: libsmbclient0 3.2.7-11.3.2 libtalloc1 3.2.7-11.3.2 libtalloc1-32bit 3.2.7-11.3.2 libtdb1 3.2.7-11.3.2 libtdb1-32bit 3.2.7-11.3.2 libwbclient0 3.2.7-11.3.2 samba 3.2.7-11.3.2 samba-client 3.2.7-11.3.2 samba-client-32bit 3.2.7-11.3.2 samba-doc 3.2.7-11.2.1 yast2-samba-server 2.17.9-0.1.2 and from the repo-oss repository: yast2-samba-client 2.17.11-1.30 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 -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.1, Kernel 2.6.27.25-0.1-default, KDE 4.3 Intel Core2 Quad Q9400 2.66GHz, 4GB DDR RAM, nVidia GeForce 9200GS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
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
Hi David, On Friday 25 September 2009 21:39:34 David C. Rankin wrote:
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)
And here we hit the first obstacle: barrowhillfarm:~ # smbpasswd -a hils Failed to open file:///etc/samba/secrets.tdb Failed to open file:///etc/samba/secrets.tdb PANIC (pid 24192): could not open secrets db BACKTRACE: 6 stack frames: #0 smbpasswd(log_stack_trace+0x1a) [0x7f89d8a2929a] #1 smbpasswd(smb_panic+0x1f) [0x7f89d8a2936f] #2 smbpasswd(get_global_sam_sid+0x547) [0x7f89d8997b77] #3 smbpasswd(main+0x514) [0x7f89d893b3f4] #4 /lib64/libc.so.6(__libc_start_main+0xe6) [0x7f89d6177586] #5 smbpasswd [0x7f89d893aac9] Segmentation fault There's something fundamentally sick with my installation, which I need to sort out first. Then I'll be delighted to use your outline :) Bob (off to bed now) -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.1, Kernel 2.6.27.25-0.1-default, KDE 4.3 Intel Core2 Quad Q9400 2.66GHz, 4GB DDR RAM, nVidia GeForce 9200GS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 25 September 2009 04:48:56 pm Bob Williams wrote:
Hi David,
On Friday 25 September 2009 21:39:34 David C. Rankin wrote:
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)
And here we hit the first obstacle:
barrowhillfarm:~ # smbpasswd -a hils Failed to open file:///etc/samba/secrets.tdb Failed to open file:///etc/samba/secrets.tdb PANIC (pid 24192): could not open secrets db BACKTRACE: 6 stack frames: #0 smbpasswd(log_stack_trace+0x1a) [0x7f89d8a2929a] #1 smbpasswd(smb_panic+0x1f) [0x7f89d8a2936f] #2 smbpasswd(get_global_sam_sid+0x547) [0x7f89d8997b77] #3 smbpasswd(main+0x514) [0x7f89d893b3f4] #4 /lib64/libc.so.6(__libc_start_main+0xe6) [0x7f89d6177586] #5 smbpasswd [0x7f89d893aac9] Segmentation fault
There's something fundamentally sick with my installation, which I need to sort out first. Then I'll be delighted to use your outline :)
Bob (off to bed now)
After your first cup of coffee, add the following (changed for your release) http://download.opensuse.org/repositories/network:/samba:/STABLE/openSUSE_11... 3.2 is an older release. 3.4 is current. update the samba packages and see if that helps. If not, a post to the samba list is usually the quickest was to get an answer. Post back if you get hung up. -- 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
On Saturday 26 September 2009 04:46:42 David C. Rankin wrote:
On Friday 25 September 2009 04:48:56 pm Bob Williams wrote:
Hi David, [...]
There's something fundamentally sick with my installation, which I need to sort out first. Then I'll be delighted to use your outline :)
Bob (off to bed now)
After your first cup of coffee, add the following (changed for your release)
http://download.opensuse.org/repositories/network:/samba:/STABLE/openSUSE_1 1.0/
3.2 is an older release. 3.4 is current.
update the samba packages and see if that helps. If not, a post to the samba list is usually the quickest was to get an answer. Post back if you get hung up.
Good morning, Thanks for the samba repo which I have added, and duly upgraded my samba installation. However, not much has changed... barrowhillfarm:~ # testparm /etc/samba/smb.conf Load smb config files from /etc/samba/smb.conf Processing section "[homes]" Processing section "[profiles]" Processing section "[users]" Processing section "[groups]" Processing section "[pictures]" Processing section "[tmp]" Loaded services file OK. ERROR: lock directory file:///var/lib/samba does not exist ERROR: state directory file:///var/lib/samba does not exist ERROR: cache directory file:///var/lib/samba does not exist ERROR: pid directory file:///var/run/samba does not exist Server role: ROLE_DOMAIN_MEMBER Press enter to see a dump of your service definitions Am I supposed to create the missing files? Who should own them? What permissions should they have? I would have thought they would have been created automatically. I shall take your advice to ask on the samba list, but when I made initial enquiries there, I was advised to re-install, which I've now done. Many thanks, Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.1, Kernel 2.6.27.25-0.1-default, KDE 4.3 Intel Core2 Quad Q9400 2.66GHz, 4GB DDR RAM, nVidia GeForce 9200GS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 26 September 2009 09:45:16 Bob Williams wrote:
On Saturday 26 September 2009 04:46:42 David C. Rankin wrote:
On Friday 25 September 2009 04:48:56 pm Bob Williams wrote:
Hi David,
[...]
There's something fundamentally sick with my installation, which I need to sort out first. Then I'll be delighted to use your outline :)
Bob (off to bed now)
After your first cup of coffee, add the following (changed for your release)
http://download.opensuse.org/repositories/network:/samba:/STABLE/openSUSE _1 1.0/
3.2 is an older release. 3.4 is current.
update the samba packages and see if that helps. If not, a post to the samba list is usually the quickest was to get an answer. Post back if you get hung up.
Good morning,
Thanks for the samba repo which I have added, and duly upgraded my samba installation. However, not much has changed...
barrowhillfarm:~ # testparm /etc/samba/smb.conf Load smb config files from /etc/samba/smb.conf Processing section "[homes]" Processing section "[profiles]" Processing section "[users]" Processing section "[groups]" Processing section "[pictures]" Processing section "[tmp]" Loaded services file OK. ERROR: lock directory file:///var/lib/samba does not exist ERROR: state directory file:///var/lib/samba does not exist ERROR: cache directory file:///var/lib/samba does not exist ERROR: pid directory file:///var/run/samba does not exist Server role: ROLE_DOMAIN_MEMBER Press enter to see a dump of your service definitions
Am I supposed to create the missing files? Who should own them? What permissions should they have? I would have thought they would have been created automatically.
I shall take your advice to ask on the samba list, but when I made initial enquiries there, I was advised to re-install, which I've now done.
Many thanks,
Bob
The answer is staring me in the face! Those lines marked ERROR above refer to lines in smb.conf such as lock directory = file:///var/lib/samba which should, of course, read lock directory = /var/lib/samba I have no idea where the spurious "file://" came from, but many thanks to Helmut Hullen on samba@lists.samba.org for helping me find the problem. Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.1, Kernel 2.6.27.25-0.1-default, KDE 4.3 Intel Core2 Quad Q9400 2.66GHz, 4GB DDR RAM, nVidia GeForce 9200GS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
Bob Williams
-
David C. Rankin