force user in Samba breaks access to two shares but works fine on many others
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
force user in Samba breaks access to two shares but works fine on many others
I have an Ubuntu 14.04 server that I am using for SFTP. The people on the outside use an SSH compatible client and the people on the LAN hit the shares from their Windows workstations. To keep permissions consistent, I am using the "force user" option in the smb.conf definitions for the shares so that everything gets assigned the correct rights and that works great on most of the shares I've created. There are two for which it does not work though. The users were created using the same script so I know there's nothing different about that process. If I enter a different user as the user to force it works fine. There's something about these two users that is different. I have double and triple-checked the configuration. I re-created one of the users. I have deleted and re-created the entry in the smb.conf file using a working example as a template which is how I stumbled upon the cause as I had forgotten to change the "force user =" line.
Below are two examples. The first one named Monet works. The second one named Picasso does not. I can SSH in to the server using either user and I am chrooted into my home directory.
[Monet]
comment = Access to the Monet FTP data
path = /userdata/home/9999993/monet
guest ok = no
browseable = yes
create mask = 0766
directory mask = 0766
read only = no
writable = yes
valid users = "@MyDomain+Domain Users"
force user = monet
admin users = AdminGuy
force group = GroupName
[Picasso]
comment = Access to the Picasso FTP data
path = /userdata/home/9999994/Picasso
guest ok = no
browseable = yes
create mask = 0766
directory mask = 0766
read only = no
writable = yes
valid users = "@MyDomain+Domain Users"
force user = Picasso
admin users = AdminGuy
force group = GroupName
From Windows, if I click on the Picasso share I get:
"\\sshserver\Picasso is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions."
"The user name could not be found."
Some caveats:
The files for these shares are actually located on a Windows server and mounted into the home directory of the user. That all works great and there is a good reason for it that I won't go into here.
The users are all Active Directory users that I have connected using Winbind.
If I go to a share I have defined above the one that's broken, I can descend into the Picasso directory without a problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.