[PATCH] samba-tool 'user create' examples incorrect

Rowland Penny repenny241155 at gmail.com
Sat Nov 21 09:27:04 UTC 2015

On 21/11/15 00:52, Michael Adam wrote:
> On 2015-11-09 at 10:12 +0000, Rowland Penny wrote:
>> Hi, the attached patch fixes a very small problem. If you run 'samba-tool
>> user create --help' you get lines like this:
>> Example5:
>> samba-tool user add User5 passw5rd --nis-domain=samdom
>> --unix-home=/home/User5
>> Note that it uses 'add' instead of 'create', the attached patch fixes this.
> Rowland,
> Thanks for the patch!
> The intended change itself is good, but a few cosmetic comments:
> - The patch changes line breaks in several places
>    where no other change is done. Please avoid that.
>    If you want to fix the formatting of the text,
>    that should be a separate patch
> - In those places where you add line breaks,
>    you introduces some trailing spaces, which make
>    git am complain. Please avoid those:
> $ git am /tmp/0001-samba-tool-user-create-examples-show-add-instead-of-.patch
> Applying: samba-tool: user create examples show 'add' instead of 'create' Signed-off-by: Rowland Penny <repenny241155 at gmail.com>
> /data/obnox/devel/samba/master-push.git/.git/rebase-apply/patch:14: trailing whitespace.
> This command creates a new user account in the Active Directory domain.
> /data/obnox/devel/samba/master-push.git/.git/rebase-apply/patch:18: trailing whitespace.
> User accounts may represent physical entities, such as people or may be used as
> /data/obnox/devel/samba/master-push.git/.git/rebase-apply/patch:19: trailing whitespace.
> service accounts for applications.  User accounts are also referred to as
> /data/obnox/devel/samba/master-push.git/.git/rebase-apply/patch:23: trailing whitespace.
> A user account enables a user to logon to a computer and domain with an
> /data/obnox/devel/samba/master-push.git/.git/rebase-apply/patch:24: trailing whitespace.
> identity that can be authenticated.  To maximize security, each user should
> warning: squelched 13 whitespace errors
> warning: 18 lines add whitespace errors.
> Cheers - Michael

OK, new patch based on Michaels comments, just changed 'add' to 'create'

-------------- next part --------------
>From 99f9c40d0f11b5e05142d0d7075d35fd95e20670 Mon Sep 17 00:00:00 2001
From: Rowland Penny <repenny241155 at gmail.com>
Date: Sat, 21 Nov 2015 09:16:51 +0000
Subject: [PATCH] samba-tool: user create examples show 'add' instead of 'create'

Signed-off-by: Rowland Penny <repenny241155 at gmail.com>
 python/samba/netcmd/user.py |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py
index ec91a93..cf640b0 100644
--- a/python/samba/netcmd/user.py
+++ b/python/samba/netcmd/user.py
@@ -52,17 +52,17 @@ Unix (RFC2307) attributes may be added to the user account. Attributes taken fro
 The command may be run from the root userid or another authorized userid.  The -H or --URL= option can be used to execute the command against a remote server.
-samba-tool user add User1 passw0rd --given-name=John --surname=Smith --must-change-at-next-login -H ldap://samba.samdom.example.com -Uadministrator%passw1rd
+samba-tool user create User1 passw0rd --given-name=John --surname=Smith --must-change-at-next-login -H ldap://samba.samdom.example.com -Uadministrator%passw1rd
 Example1 shows how to create a new user in the domain against a remote LDAP server.  The -H parameter is used to specify the remote target server.  The -U option is used to pass the userid and password authorized to issue the command remotely.
-sudo samba-tool user add User2 passw2rd --given-name=Jane --surname=Doe --must-change-at-next-login
+sudo samba-tool user create User2 passw2rd --given-name=Jane --surname=Doe --must-change-at-next-login
 Example2 shows how to create a new user in the domain against the local server.   sudo is used so a user may run the command as root.  In this example, after User2 is created, he/she will be forced to change their password when they logon.
-samba-tool user add User3 passw3rd --userou='OU=OrgUnit'
+samba-tool user create User3 passw3rd --userou='OU=OrgUnit'
 Example3 shows how to create a new user in the OrgUnit organizational unit.
@@ -72,7 +72,7 @@ samba-tool user create User4 passw4rd --rfc2307-from-nss --gecos 'some text'
 Example4 shows how to create a new user with Unix UID, GID and login-shell set from the local NSS and GECOS set to 'some text'.
-samba-tool user add User5 passw5rd --nis-domain=samdom --unix-home=/home/User5 \
+samba-tool user create User5 passw5rd --nis-domain=samdom --unix-home=/home/User5 \
            --uid-number=10005 --login-shell=/bin/false --gid-number=10000
 Example5 shows how to create an RFC2307/NIS domain enabled user account. If

More information about the samba-technical mailing list