Can see samba shares but not access them
Solution 1
I had the same problem with windows 7 To fix it All i had to do was change smb.conf
In terminal run
sudo gedit /etc/samba/smb.conf
Then change
wins support = no
name resolve order = lmhosts host wins bcast
To
wins support = yes
name resolve order = wins lmhosts host bcast
Then restart samba
sudo service smbd restart
Solution 2
that could happen if shared folder resides on FAT32 volume (e.g. flash card) and Ubuntu can't add permissions for samba to check. I'm not sure what is the right way to define access rights in that case but simple workaround is to move folder to ext4 volume and share it from there.
Related videos on Youtube
nitefrog
BY DAY: Envangilze open source technologies and roll up the sleeves to play! BY NIGHT: Write poetry and short stories into the wee hours of the morning. FOR FUN: Read a ton, live a lot, and drink as much coffee as I am humanly able.
Updated on September 18, 2022Comments
-
nitefrog over 1 year
For the life of me I cannot figure this one out.
I have samba installed and set up on the ubuntu box and on the Win7 box I CAN SEE all the shares I created.
I created two users on ubuntu that map to the users in windows. On ubuntu they are both admins, user A & B on Windows User A is admin and user B is poweruser.
User A can see both shares and access them, but user B can see everythin, but only access the homes directory, the other directory throws an error.
I have two drives in Ubuntu and this is the smb.config file (I am new to samba):
[global] workgroup = WORKGROUP server string = %h server (Samba, Ubuntu) wins support = no dns proxy = yes name resolve order = lmhosts host wins bcast log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d security = user encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user ; usershare max shares = 100 usershare allow guests = yes
And here is the share section:
Both user A & B can access this from windows. No problems.
[homes] comment = Home Directories browseable = no writable = yes
Both User A & B can see this share, but only user A can access it. User B get an error thrown.
[stuff] comment = Unixmen File Server path = /media/data/appinstall/ browseable = yes ;writable = no read only = yes hosts allow =
The permission for the media/data/appinstall/ is as follows:
appInstall properties:
share name: stuff Allow others to create and delete files in this folder is cheeked Guest access (for people without a user account) is checked
permissions:
Owner: user A Folder Access: Create and delete files File Access: --- Group: user A Folder Access: Create and delete files File Access: --- Others Folder Access: Create and delete files File Access: ---
I am at a loss and need to get this work. Any ideas?
The goal is to have a setup like this. 3 users on window machines. Each user on the data drive will have their own personal folder where they are the ones that can only access, then another folder where 2 of the users will have read only and one user full access.
I had this setup before on windows, but after what happened I am NEVER going back to windows, so Unix here I am to stay!
I am really stuck. I am running Ubuntu 11. I could reformat again and put on version 10 if that would make life easier. I have been dealing with this since Wed. 3pm.
Thanks.
-
Admin over 12 yearsTried by IP? \\192.168.0.10\share? If that works, the problem is narrowed to WINS.
-
Admin over 12 yearsSame issue. I think it is a permission things on the unix side.
-
Admin over 11 yearswhats the exact error message you're getting? What are the logfiles saying (/var/log/samba/*)?
-
-
endolith over 7 yearsmine doesn't have
name resolve order = lmhosts host wins bcast
. is this outdated? -
mlandiland over 7 yearsIt is from March 11 2012. It probably is outdated