diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-09-27 18:44:43 -0700 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-10-18 22:34:29 +0200 |
commit | d09f15163843c5a027476e9087ae96700f6de003 (patch) | |
tree | 8bc92af563aed9797f0f14e076373c5f31d44294 | |
parent | e7c8fcaea5b06897603abb6f4f38ce39b400c9a7 (diff) | |
download | samba-d09f15163843c5a027476e9087ae96700f6de003.tar.gz samba-d09f15163843c5a027476e9087ae96700f6de003.tar.bz2 samba-d09f15163843c5a027476e9087ae96700f6de003.zip |
samba-tool user: Fix typos, improve messages.
-rw-r--r-- | source4/scripting/python/samba/netcmd/user.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py index 9bb232b550..4667d52d91 100644 --- a/source4/scripting/python/samba/netcmd/user.py +++ b/source4/scripting/python/samba/netcmd/user.py @@ -297,10 +297,10 @@ samba-tool user enable Testuser1 --URL=ldap://samba.samdom.example.com --usernam Example1 shows how to enable a user in the domain against a remote LDAP server. The --URL parameter is used to specify the remote target server. The --username= and --password= options are used to pass the username and password of a user that exists on the remote server and is authorized to update that server. -Exampl2: +Example2: su samba-tool user enable Testuser2 -Example2 shows how to enable user Testuser2 for use in the domain on the local server. sudo is used so a user may run the command as root. +Example2 shows how to enable user Testuser2 for use in the domain on the local server. sudo is used so a user may run the command as root. Example3: samba-tool user enable --filter=samaccountname=Testuser3 @@ -386,7 +386,7 @@ class cmd_user_disable(Command): class cmd_user_setexpiry(Command): """Set the expiration of a user account. -This command sets the expiration of a user account. The username specified on the command is the sAMAccountName. The username may also be specified using the --filter option. +The user can either be specified by their sAMAccountName or using the --filter option. When a user account expires, it becomes disabled and the user is unable to logon. The administrator may issue the samba-tool user enable command to enable the account for logon. The permissions and memberships associated with the account are retained when the account is enabled. @@ -397,7 +397,7 @@ samba-tool user setexpiry User1 --days=20 --URL=ldap://samba.samdom.example.com Example1 shows how to set the expiration of an account in a remote LDAP server. The --URL parameter is used to specify the remote target server. The --username= and --password= options are used to pass the username and password of a user that exists on the remote server and is authorized to update that server. -Exampl2: +Example2: su samba-tool user setexpiry User2 Example2 shows how to set the account expiration of user User2 so it will never expire. The user in this example resides on the local server. sudo is used so a user may run the command as root. @@ -450,8 +450,12 @@ Example4 shows how to set the account expiration so that it will never expire. # FIXME: Catch more specific exception raise CommandError("Failed to set expiry for user '%s': %s" % ( username or filter, msg)) - self.outf.write("Set expiry for user '%s' to %u days\n" % ( - username or filter, days)) + if days: + self.outf.write("Expiry for user '%s' set to %u days.\n" % ( + username or filter, days)) + else: + self.outf.write("Expiry for user '%s' disabled.\n" % ( + username or filter)) class cmd_user_password(Command): |