[Samba] CHANGING PRIMARY GROUP

Michael Billerbeck billerbeck at adesso.de
Thu Mar 23 11:14:59 GMT 2006


Hi Patrick,

samba-bounces+billerbeck=adesso.de at lists.samba.org schrieb am 23.03.2006
11:30:10:

> Hi to all,
>
>
>
> I have a samba acting as a PDC with 'passdb backend=smbpasswd'. My
version
> of samba is 3.0.14a on linux Debian 2.6.8.
>

First of all: if I read correctly it's better to use at least the password
backend
tdbsam (trivial database sam) in this context.
That's what I have read in the How-To or by-Example.

>
> I have defined an interdomain trusted connection with a NT4 domain.
>
>
>
> I can see the trusted accounts and groups, and add them to local group
with
> the 'net rpc group.' command.
>
>
>
> My problem is when I want to allow one user from this trusted domain to
> access to a share. The group seen by samba and sent to unix is the
primary
> group which is the domain account group.
>
> I want to change this primary group, but I haven't seen tools for that.
>
>
>
> Could you help me ?
>
You can change the primary group RID or SID by using pdbedit:

pdbedit -r <username> -G <SID>
or
pdbedit -r <username> -G <RID>

If the parameter after the G-option (-G) doesn't start with 'S-' pdbedit
assumes
you passed an RID because SIDs start with S-1-5...

example:

pdbedit -r michael -G 513

513 ist the well-known RID for users windows environments.

cheers,
Michael



More information about the samba mailing list