summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGiampaolo Lauria <lauria2@yahoo.com>2011-07-15 13:46:27 -0400
committerAndrew Tridgell <tridge@samba.org>2011-07-21 10:32:24 +1000
commitc9bf7022fd9a20abf5d75bb7543f132203566ab8 (patch)
tree686228ebab60f44ebcb12aae8f2577b78f010d81 /source4
parentf6fa8684896b8f3f9f8b7bd3742c99906973274c (diff)
downloadsamba-c9bf7022fd9a20abf5d75bb7543f132203566ab8.tar.gz
samba-c9bf7022fd9a20abf5d75bb7543f132203566ab8.tar.bz2
samba-c9bf7022fd9a20abf5d75bb7543f132203566ab8.zip
samba-tool: fixed synopsis on all "user" commands
Added [options] where needed, fixed others where filter or username was needed, renamed name to username Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/netcmd/user.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py
index 2beb008980..8d4b04a09e 100644
--- a/source4/scripting/python/samba/netcmd/user.py
+++ b/source4/scripting/python/samba/netcmd/user.py
@@ -36,9 +36,10 @@ from samba.netcmd import (
)
+
class cmd_user_add(Command):
"""Create a new user."""
- synopsis = "%prog user add <name> [<password>]"
+ synopsis = "%prog user add <username> [<password>] [options]"
takes_args = ["name", "password?"]
@@ -51,9 +52,10 @@ class cmd_user_add(Command):
net.set_password(name, creds.get_domain(), password, creds)
+
class cmd_user_delete(Command):
"""Delete a user."""
- synopsis = "%prog user delete <name>"
+ synopsis = "%prog user delete <username> [options]"
takes_args = ["name"]
@@ -67,6 +69,7 @@ class cmd_user_delete(Command):
raise CommandError("Failed to delete user %s: %s" % (name, msg))
+
class cmd_user_enable(Command):
"""Enables a user"""
@@ -99,10 +102,11 @@ class cmd_user_enable(Command):
print("Enabled user %s" % (username or filter))
+
class cmd_user_setexpiry(Command):
"""Sets the expiration of a user account"""
- synopsis = "%prog user setexpiry <username> [options]"
+ synopsis = "%prog user setexpiry (<username>|--filter <filter>) [options]"
takes_options = [
Option("-H", help="LDB URL for database or target server", type=str),
@@ -139,7 +143,7 @@ class cmd_user_setexpiry(Command):
class cmd_user_setpassword(Command):
"""(Re)sets the password of a user account"""
- synopsis = "%prog user setpassword [username] [options]"
+ synopsis = "%prog user setpassword (<username>|--filter <filter>) [options]"
takes_options = [
Option("-H", help="LDB URL for database or target server", type=str),