From: Douglas Bagnall Date: Sun, 2 Mar 2025 01:06:21 +0000 (+1300) Subject: manpages:samba-tool user addunixattrs X-Git-Tag: tevent-0.17.0~535 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=192b871bca272a21cd40b28eacc5aa7123bac799;p=thirdparty%2Fsamba.git manpages:samba-tool user addunixattrs Signed-off-by: Douglas Bagnall Reviewed-by: Rowland Penny --- diff --git a/docs-xml/manpages/samba-tool.8.xml b/docs-xml/manpages/samba-tool.8.xml index 3432110d464..f0b4a4804bc 100644 --- a/docs-xml/manpages/samba-tool.8.xml +++ b/docs-xml/manpages/samba-tool.8.xml @@ -3846,6 +3846,112 @@ in use. Add a new user to the Active Directory Domain. + + + user addunixattrs <replaceable>username</replaceable> <replaceable>uid-number</replaceable> [options] + + Add RFC2307 attributes to a user. + + This command adds Unix attributes to a user account in the Active + Directory domain. + + The username specified on the command is the sAMaccountName. + + You must supply a unique uid. + + Unix (RFC2307) attributes will be added to the user account. + + If you supply a group id with '--gid-number', this will be used for the + users Unix 'gidNumber' attribute. + + If '--gid-number' is not supplied, the users Unix gidNumber will be set to the + one found in 'Domain Users', this means Domain Users must have a gidNumber + attribute. + + If '--unix-home' is not supplied, the users Unix home directory will be + set to /home/DOMAIN/username. + + If '--login-shell' is not supplied, the users Unix login shell will be + set to '/bin/sh' + + If ---gecos' is not supplied, the users Unix gecos field will be set to the + user's 'CN' attribute. + + Add 'idmap_ldb:use rfc2307 = Yes' to the smb.conf on DCs to use these + attributes for UID/GID mapping. + + The command may be run from the root userid or another authorised userid. + The -H or --URL= option can be used to execute the command against a + remote server. + + Example1: + samba-tool user addunixattrs User1 10001 + + + Example1 shows how to add RFC2307 attributes to a domain enabled user + account, Domain Users will be set as the users gidNumber. + + The users Unix ID will be set to '10001', provided this ID isn't already +in use. + + Example2: + samba-tool user addunixattrs User2 10002 --gid-number=10001 --unix-home=/home/User2 + + + Example2 shows how to add RFC2307 attributes to a domain enabled user +account. + + The users Unix ID will be set to '10002', provided this ID isn't already +in use. + + The users gidNumber attribute will be set to '10001' + + The users Unix home directory will be set to '/home/user2' + + Example3: + samba-tool user addunixattrs User3 10003 --gid-number=10001 --login-shell=/bin/false --gecos='User3 test' + + + Example3 shows how to add RFC2307 attributes to a domain enabled user + account. + + The users Unix ID will be set to '10003', provided this + ID isn't already in use. The users gidNumber attribute will be + set to '10001'. The users Unix login shell will be set to + '/bin/false'. The users gecos field will be set to 'User3 + test'. + + + + + -H URL, --URL=URL + LDB URL for database or target server + + + --gid-number=GROUP_ID + User's Unix/RFC2307 GID + + + --unix-home=DIR + User's Unix/RFC2307 home directory + + + --login-shell=SHELL + User's Unix/RFC2307 login shell + + + --gecos=GECOS + User's Unix/RFC2307 GECOS field + + + --uid=USER_ID + User's Unix/RFC2307 user id + + + + + + user create <replaceable>username</replaceable> [<replaceable>password</replaceable>] Add a new user. This is a synonym for the