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.
OK Solved! by making the uid's for the users the same.
Is there a workaround for this? See below & thanks!
Samba is mounting a share I have on a Linux box consistently under the wrong user. My shares are mounted on startup via smbfstab in SuSE 10.2, but it happens when I'm manually mounting them as well.
One of the shares adds fine, but this one somehow always defaults to user 1003.
I have tried adding uid=xxxx; didn't work, neither in smbfstab as manually.
Tried deleting the user account on the server that the share is on, and to which it's falling back but that didn't work.
When I delete that user, ls -l gives the uid=1003 only; the username is now gone.
Thus it seems to be happening on the client side, or is there some user id transferred from that server?
Reviewed all permissions, inherit ACLS=on, reviewed all ownerships and passwords and even reset them.
Why would this happen?
I'm stuck now as I can't write to that share due to missing user rights.
mount -t cifs -o username=marinus,password=secret //SERVER/folder /mnt/folder changes ownership of the mountpoint under /mnt.
So if user 1005 owns //SERVER/folder that userid is reflected
as new owner of /mnt/folder after mounting. At least, on my side. ls -l before /mnt for example gives uid=1002, but after mounting it shows 1005 as owner if 1005 on //SERVER owns the folder.
If there is no username tied to the uid for the //SERVER/folder it just shows that uid. Otherwise, if there is, the username for that uid on the client side is listed as owner.
And I don't want that.
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344
Rep:
I suppose it's a matter of choice, but when I set up shares on my samba server, I set up a corresponding group that has access to that share. For instance I may have a share called "sales". Then I set up a corresponding group called "sales" and allow access to that share for that group. Since linux permissions are based on owner/group/guest it is very easy to manage that way. Something to think about anyway.
Of course that is a solution, but in this case it does not apply.
Still hope I can find more information about this behavior.
Anyone know documentation for Samba that discusses these rules?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.