LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 01-07-2007, 10:40 PM   #1
Marinus
LQ Newbie
 
Registered: Aug 2005
Distribution: Debian Etch
Posts: 20

Rep: Reputation: 0
Samba mounts share under wrong username


Hi,

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.

Thanks in advance,

Marinus.

Last edited by Marinus; 01-07-2007 at 11:47 PM.
 
Old 01-08-2007, 03:54 PM   #2
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
I'm really confused. What has your linux user ID's got to do with a share? Please explain what you are trying to do?
 
Old 01-08-2007, 08:10 PM   #3
Marinus
LQ Newbie
 
Registered: Aug 2005
Distribution: Debian Etch
Posts: 20

Original Poster
Rep: Reputation: 0
Hi ScooterB,

ownership;

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.

Marinus.

Last edited by Marinus; 01-08-2007 at 08:15 PM.
 
Old 01-09-2007, 08:21 AM   #4
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
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.
 
Old 01-09-2007, 09:25 AM   #5
Marinus
LQ Newbie
 
Registered: Aug 2005
Distribution: Debian Etch
Posts: 20

Original Poster
Rep: Reputation: 0
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?

Marinus.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub mounts wrong partition linuxer12 Linux - General 10 11-07-2007 04:09 AM
SMB4K mounts share then disappears vientorio Linux - Newbie 0 12-19-2006 06:26 AM
fstab mounts Windows share but read only. Charlie Spencer Linux - Newbie 19 07-26-2006 12:46 PM
Samba share authentication using logon username and password mikepengelly Linux - Software 0 08-31-2004 04:47 AM
SAMBA: display of share names is OK but files names are wrong superandrzej Linux - Software 5 02-02-2004 10:14 AM


All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration