debian etch - samba issue
Hey All,
I have just set up a fresh linux install - followed the samba guide at aboutdebian.com but cannot access any shares. When I try to access the share from a windows machine get following error; \\Serenity is not accessible. You might not have permission to use this network resource. Contact the administrator of .... The network path was not found. My smb.conf; [global] workgroup = MYHOMENET server string = %h server (Samba %v) ; wins support = no ; wins server = w.x.y.z dns proxy = no ; name resolve order = lmhosts host wins bcast log file = /var/log/samba/log.%m max log size = 1000 ; syslog only = no syslog = 0 panic action = /usr/share/samba/panic-action %d security = share encrypt passwords = true passdb backend = tdbsam guest obey pam restrictions = yes ; guest account = nobody invalid users = root ; unix password sync = no passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . ; pam password change = no load printers = yes printing = bsd printcap name = /etc/printcap ; printing = cups ; printcap name = cups ; printer admin = @ntadmin preserve case = yes short preserve case = yes ; include = /home/samba/etc/smb.conf.%m socket options = TCP_NODELAY ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & ; domain master = auto ; idmap uid = 10000-20000 ; idmap gid = 10000-20000 ; template shell = /bin/bash [files] comment = Shared Files path = /home/share writable = yes guest ok = yes [homes] comment = Home Directories browseable = no writable = no create mask = 0700 directory mask = 0700 ;[netlogon] ; comment = Network Logon Service ; path = /home/samba/netlogon ; guest ok = yes ; writable = no ; share modes = no [printers] comment = All Printers browseable = yes path = /tmp printable = yes public = yes writable = yes create mode = 0777 [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no ; write list = root, @ntadmin ;[cdrom] ; comment = Samba server's CD-ROM ; writable = no ; locking = no ; path = /cdrom ; public = yes ; preexec = /bin/mount /cdrom ; postexec = /bin/umount /cdrom |
Hey There,
I don't see any glaring errors, but maybe these two lines would help if you added them to your file share sections: Quote:
Quote:
Best wishes, Mike |
Thanks eggixyz - I made those changes and now the system itself does not appear under the Mshome network on my XP machine.
I tried with & without the netbios string - no change. What would cause it to now not be displayed? |
I restarted the computer and now have a different issue;
Under windows networking, now have two lists; Mshome; - serenity server (Samba 3.0.24) (Serenity) Myhomenet - cant expand the list Both are still showing the same error as before. I also ran testparm - but the output did not seem to match the smb.conf file (i.e. the changes done as above). I restarted the service but got an error; serenity:/etc/samba# /etc/init.d/samba restart Stopping Samba daemons: nmbd smbdstart-stop-daemon: warning: failed to kill 3330: No such process. Starting Samba daemons: nmbd smbd. |
Hey There,
That doesn't seem to make any sense... If you remove all the changes and completely stop the smbd and nmbd processes and restart them, does it still not show up? I can't think of a reason why adding those options would cause your system to disappear. The only one that could have made a difference would be the netbios string. One thing to keep in mind also, is that the Windows PDC can sometimes take a good while to find a new machine (or one that's changed). It's been a long time since I've admin'ed Windows (NT 4.0) but that might be part of the issue. Also, here's another string you could add to your smb.conf to see if it is really gone or if it's just a name resolution problem with Windows: name resolve order = lmhosts host wins bcast You already have it in there commented out, but this way you could edit your lmhosts or host file on your local machine, add an entry for your samba server and it should show up. That would mean that WINS dumped it and will take some time to find it again. Let me know how this progresses, Best wishes, Mike |
oops,
We're replying to each other at the same time ;) If you can see the share again, have you checked out the file and directory masks in samba? The next thing I would do would be to set those to 0777 and see if I could connect. If that works, I think 0755 would be acceptable for both, but that's up to you. , Mike |
Thanks Eggixyz,
I have changed some things around and now have it all working correctly. I have one more question though; Can samba be set up with User security (i.e. network user file in /etc/samba/) to restrict access to certain shares, but have certain shares available & browsable to ALL users? Reason being - I want to have my folders only accessable by myself, but want to set up two special folders for "other users" backup & a media share folder which can be read by anyone (my xbox for example) and set it up as read only? Thanks for your help. |
Hey,
No problem. The short answer is yes. The long answer is it can be a headache depending on how you do it. There are ways to differentiate between shares, as far as auth goes, and to integrate with Windows authentication. Usually, if I'm not sure what to do next, I'll use Swat first. It should come with your Samba distribution and you can set it up pretty easily by adding an entry for it in /etc/inetd.conf or creating /etc/xinetd.d/swat. Then you can connect to it through a web browser on that host on port 901 (swat is a standalone webserver). Look athe options you have there for your shares and, if they don't quite have what you're looking for, select to show advanced options. There are so many, it's crazy :) Best wishes, Mike |
You could have a profiles share:
Code:
[profiles] A user needs to be authenticated to access the profile share. The actual path of the share will be the users home directory. You can also control read and write access using "Valid Users" instead. You could use a different path and have a directory with your user name there as in: "path = /var/samba/%u". You might want to use "valid user = %u" in this case as well so that samba won't try to find /var/samba/%u for another user. If you have many users, then using the profile share and not a [HOME] share would keep things clean because you won't need to search for your own home directory from a large group. Each user simply logs into the [Profile] share and they are in their home directory. I which our windows network at work would work like that! Also remember to use the correct permissions on the directories. If you have a global read/write share, you need to set the "sticky" bit when creating the directory: "sudo chmod ugo=rwxt". This will prevent one user from deleting another user's file. However for a read only share, they can't do that anyway. |
Quote:
Could you tell me what it is you've changed that fixed your problem? I'm having a very similar problem myself: After rebooting my debian etch machine accidentally samba no longer works. It'll work fine locally but I get "network path not found" when trying to map it as a network drive in XP. |
All times are GMT -5. The time now is 06:53 PM. |