Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 10-11-2011, 03:14 AM   #1
LQ Newbie
Registered: Sep 2011
Posts: 27

Rep: Reputation: Disabled
Samba : Mapping User home direcories, and forcing UID's and GID's

I have set up a Linux Box (RHEL 3) to test Samba/Kerberos/Winbind authenticating against a Windows 2003 R2 Active Directory. This all works fine now. My next step is to resolve a few 'odd' issues, so I can look to deploy this on 'live' servers. Can somebody give me some pointers / guidance on how I might be able to overcome the following;

1) The 'live' linux boxes already have accounts on them with local authentication. For example, user Fred Bloggs logs in as fredb, with a home directory of /usr/users/fredb. However, for reasons that are too long-winded to explain, Fred's domain login is bloggsf. What I would like to be able to achieve is that Fred logs into the linux box with his domain credentials and is givne his existing home directory of /usr/users/fredb. I am really not sure how this could be done. (NOTE : As an extra twist, the live servers use LDAP for authentication now, and the home directories are on a different server, or at least a partition from there is mounted locally).

2) Because of the way we work, users can switch there Group membership, depending on what they are working on. Users switch groups by running a simple script. Now, I am presuming that since I am authenticating against AD, then the UID and GID are stored within AD. Is it right to assume that if I change my GID on the Linus box, then Samba will replicate this change onto AD? (I guess I could try this, but don't have all the scripts available on my test server at the moment).

Many thanks in anticipation.
Old 10-19-2011, 11:14 AM   #2
LQ Newbie
Registered: Aug 2011
Location: Pittsburgh, Pa
Distribution: Centos 6.4
Posts: 29

Rep: Reputation: Disabled
I believe you can achieve this with the smbusers file. It holds mappings of logins to unix usernames (for example, my username on my XP laptop and Linux box are both 'jeremiah' so a line in mine reads:

jeremiah = jeremiah

Not the greatest example I know because the logins are the same but yours would go something like:

bloggsf = fredb

There are some good links with tons of useful info (better than pouring through man pages). here's a few I used setting up my first samba server.

Like I said, I'm no expert but I've managed to get a Samba server up and running and authenticating properly and I believe what you are attempting to do is possible, just gonna have to toy around with it some. There should also be a way to force UID/GID or permissions on the shares.
Old 10-20-2011, 02:56 AM   #3
LQ Newbie
Registered: Sep 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
Thanks for your reply, this was just the kind of lead I needed from my fairly vague question.

I have tried this, but to no avail. As you suggest though it just needs some tinkering I am sure. To that end I have created a new, more specific thread to cover the issue of mapping home directories, which is here;


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
Need Help Deciding UID/GID range for Samba Server JeffC1 Linux - Software 4 08-17-2008 07:36 AM
user and group names from uid and gid PatrickNew Programming 3 06-02-2007 09:26 PM
How can I change a user's uid and gid? homesp Debian 2 05-31-2005 02:39 PM
SuSE 9.2, Samba, wrong GID/UID after mount dickohead Linux - Networking 2 04-21-2005 04:38 AM
Samba uid/gid mapping (Server to client) problems mcle Linux - Networking 2 01-07-2005 08:16 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:41 PM.

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