Skip to content

Commit

Permalink
Minor changes to exit statuses and help information.
Browse files Browse the repository at this point in the history
  • Loading branch information
melloc committed Aug 21, 2013
1 parent d03e3e4 commit f6d8b11
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def shellexists(shell):
return (shell in shells) and os.path.exists(shell)

parser = argparse.ArgumentParser(description="Change a user's shell.")
parser.add_argument('-s','--shell',type=str,help='The new login shell of the user.',default='')
parser.add_argument("user",type=str,help='The login whose shell is being changed. This must be a valid shell in /etc/shells.')
parser.add_argument('-s','--shell',type=str,help='The new login shell of the user. This must be a valid shell in /etc/shells.',default='')
parser.add_argument("user",type=str,help='The login whose shell is being changed.')
args = parser.parse_args()

if not shellexists(args.shell):
Expand Down
2 changes: 1 addition & 1 deletion mailpasswd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def modifyMailpasswd(conn, dn, stdin=False):
again = getpass.getpass("New mail password again: ")
if passwd != again:
print "Passwords do not match."
return
exit(1)

conn.modify_s(dn,[(ldap.MOD_REPLACE, 'userPassword', passwd)])

Expand Down
Empty file modified manageldap.py
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions useradd
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ if re.match("^[a-z][a-z0-9-]*$", args.login):
performLocal(args.login)
else:
print("Username must start with a lowercase letter and contain only letters, numbers and dashes.")
exit(1)

0 comments on commit f6d8b11

Please sign in to comment.