[Samba] Override Linux homedir given by AD
rowlandpenny at googlemail.com
Thu Oct 31 05:59:15 MDT 2013
On 31/10/13 10:56, Simon wrote:
> On 2013-10-31 10:45, Rowland Penny wrote:
>> On 31/10/13 10:28, Simon wrote:
>>> On 2013-10-31 10:03, steve wrote:
>>>> On Wed, 2013-10-30 at 22:27 +0000, Simon wrote:
>>>>> The Linux uid is pulled from the uidNumber in Active Directory
>>>> Hi That's a bad idea and may explain why the homedir is not
>>>> working. It's best to leave uidNumber as it is and pull uid as
>>>> samAccountName. e.g. you would expect a home directory to be
>>>> something like: /home/domain/simon rather than:
>>>> /home/domain/30012673 Cheers, Steve
>>> Thanks but I'm not sure I follow, At the moment when I log on with
>>> an AD account that has not logged in before the users home is
>>> created in /User and then if I run the command 'id' the uid matches
>>> the attribute called uidNumber in AD. Is this not good?
>> Hi, I think that there is some confusion here, uid seems to be getting
>> mistaken for uidNumber. uid is the usersname and uidNumber is the users
>> uid number (obviously), if you create a user through ADUC and then add
>> the UNIX attributes you get both, uid which is the same as the username
>> or samAccountName and the uidNumber.
> Thanks, that makes sense. Although looking through the attributes in
> this AD there is no uid. I'm fairly confident that the configuration
> is ok as id does return uid=xxx(username). But I might be wrong.
If you use samba-tool to add a user, you do not get the 'uid' attribute,
but as I said, if you create a user with ADUC on windows and then add
the Unix attributes you do. So if you need the 'uid' attribute, you will
have to add it with an ldif and ldbmodify.
You are still mixing up windows 'uid' and Linux 'uid'. On windows 'uid'
is the username, on Linux it is the users number.
More information about the samba