[SOLVED] Samba 3.2.5: share "does not exist or permission denied when connecting to [...]"
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Samba 3.2.5: share "does not exist or permission denied when connecting to [...]"
Samba 3.2.5: can access /home/user but nothing on /mnt/md0/samba/...
Error message from samba: "'/mnt/md0/samba/homes/thomas' does not exist or permission denied when connecting to [thomas] Error was Permission denied"
Hello Everybody
I'm getting really frustrated here and need some help getting something to work.
Situation:
I recently configured a new server since our old one got really old and had to be replaced. I therefore moved from FC5 to debian (I've grown up with Redhat and fedora, just getting used to debian). Since I trimmed down the services I need, the new server basically only does function as a samba workgroup server. No firewall or SElinux is configured (firewall is external and as far as I know, SElinux is not even installed).
Several users need access to their files on the samba. As you will see in the samba config-file, every user has its home directory and has access to a common share (called "shared").
Configuration:
The system has 5 hard drives that run in 2 raid-1 formations: 2 Drives form the system partitions and 3 drives are for user data (md0).
Samba:
To be sure the new configuration would work, I did not just take over the old configuration from the FC5 server, but filled in everything anew.
Code:
server2:~# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[shared]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = Workgroup
netbios name = Workgroup-SERVER
server string = Workgroup Samba Server
obey pam restrictions = Yes
log level = 3
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
panic action = /usr/share/samba/panic-action %d
[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0775
directory mask = 0775
browseable = No
vfs objects = recycle
recycle:exclude_dir = /tmp Papierkorb
recycle:exclude = *.tmp ~$* *.~?? *Temp.0
recycle:maxsixe = 0
recycle:versions = Yes
recycle:touch = Yes
recycle:keeptree = Yes
recycle:repository = Papierkorb
[shared]
path = /mnt/md0/samba/shared
valid users = @workgroup
write list = @workgroup
read only = No
create mask = 0774
directory mask = 0775
vfs objects = recycle
recycle:directory_mode = 0770
recycle:exclude_dir = /tmp Papierkorb
recycle:exclude = *.tmp ~$* *.~?? *Temp.0
recycle:maxsixe = 0
recycle:versions = Yes
recycle:touch = Yes
recycle:keeptree = Yes
recycle:repository = Papierkorb
server2:~#
My Problem
As it is configured right now, I cannot access the share "shared" at all (to simplify, I will try everything with the user "thomas") or any user home-folder located on the same drive as shared. But home folders on the root share (/ --> /home/sysadmin) are accessible. Trying to access it from the old linux server, this is what I get as a response:
Code:
[root@server-old ~]# smbclient -U thomas //192.168.0.2/shared
Password:
Domain=[Workgroup-SERVER] OS=[Unix] Server=[Samba 3.2.5]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
[root@server-old ~]#
The same happens, if I try to connect to thomas' home directory, which is normally located in /mnt/md0/samba/homes/thomas. BUT if this home directory is located in /mnt/home/thomas, the connection CAN be established (user sysadmin still has his home directory in that place).
So basically: samba does seem to work, home directories located on the / partition can be accessed, everything in /mnt/md0/... cannot. I checked the logs, users do get the correct user IDs and group IDs. This is also supported by the fact, that the login to the home directory in /home/user does work.
The users use Windows XP / Win7 machines. In explorer, they do see the shares they have permission to, but they cannot access them, getting an error that sounds something like "wrong network path".
What I did so far:
I checked the paths, even though they looked alright, I copied them from pwd to the config, just to be sure. I made sure, that the login works (as described above). I made sure, that permissions were not the problem (right now, total control: chmod -R 777 /mnt/md0/samba/shared; chown -R root:workgroup /mnt/md0/samba/shared)
Please do help me out figure out what is wrong here, I really tried my best to have everything work. But again, something just got messed up. I have found some simmilar problems, but those were usually resolved by switching of SElinux, which I don't think I have even installed (does debian maybe have something simmilar?)
Some more info that usually gets asked in other posts
/var/log/messages does not display any errors
Code:
[root@server-old ~]# smbclient -U thomas -L 192.168.0.2
Password:
Domain=[Workgroup-SERVER] OS=[Unix] Server=[Samba 3.2.5]
Sharename Type Comment
--------- ---- -------
shared Disk
IPC$ IPC IPC Service (Workgroup Samba Server)
thomas Disk Home Directories
Domain=[Workgroup-SERVER] OS=[Unix] Server=[Samba 3.2.5]
Server Comment
--------- -------
Workgroup Master
--------- -------
Workgroup Workgroup-SERVER
[root@server-old ~]#
Code:
server2:~# testparm /etc/samba/smb.conf thomas 192.168.0.55
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[shared]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Allow connection from thomas (192.168.0.55) to homes
Allow connection from thomas (192.168.0.55) to shared
server2:~#
Code:
[root@server-old ~]# smbclient -U thomas //192.168.0.2/shared
Password:
Domain=[Workgroup-SERVER] OS=[Unix] Server=[Samba 3.2.5]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
[root@server-old ~]# smbclient -U sysadmin //192.168.0.2/shared
Password:
Domain=[Workgroup-SERVER] OS=[Unix] Server=[Samba 3.2.5]
tree connect failed: NT_STATUS_ACCESS_DENIED
//This is correct, sysadmin does not belong to the group workgroup, therefore no access to shared
[root@server-old ~]# smbclient -U sysadmin //192.168.0.2/sysadmin
Password:
Domain=[Workgroup-SERVER] OS=[Unix] Server=[Samba 3.2.5]
smb: \> exit
[root@server-old ~]# smbclient -U thomas //192.168.0.2/thomas
Password:
Domain=[Workgroup-SERVER] OS=[Unix] Server=[Samba 3.2.5]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
[root@server-old ~]#
Trying locally:
Code:
server2:~# smbclient -U thomas //localhost/shared
Enter thomas's password:
Domain=[Workgroup-SERVER] OS=[Unix] Server=[Samba 3.2.5]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
server2:~#
Trying to connect to the home share "thomas"; samba-machine-log:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.