[Samba] wbinfo works, id and getent don't

Sketch smblist at rednsx.org
Fri Oct 16 15:51:37 UTC 2015


On Fri, 16 Oct 2015, Rowland Penny wrote:

> Hi, do your users have a uidNumber attribute containing a unique number 
> between 10000 to 999999 ?
> Also, does 'Domain Users' have a gidNumber, again inside the 10000-99999 
> range ?
>
> These attributes *do not* exist as standard, you have to create them 
> manually, either using the ADUC Unix Attributes tab or by directly editing 
> AD, you cannot do this with samba-tool.

You are correct about groups.  The samba-tool group add command has no 
provision to specify a gid.  The only way to give a group a gid is by 
modifying the LDAP entry with ADUC or ldbmodify/ldbedit or the like.

However, while you also can't do this for existing users with samba-tool, 
you can do it for new users (once you have your groups set up):

samba-tool user create jsmith --uid-number=10000 --gid-number=10000

See "samba-tool user create --help" for all the options.  Note that 
samba-tool will not prevent you from assigning the same UID to two users, 
you must make sure the UIDs are unique yourself.  Wouldn't be too hard to 
write a wrapper script that does a getent passwd and picks the next unused 
sequential number.



More information about the samba mailing list