Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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.
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?
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
[profiles]
comment = Network Profiles Service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes
Take a gander at the smb.conf manpage. It lists the variables you can use such as %H for a users home page, %u for the username, etc.
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.
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.
Hi wo2caisley
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.