Index: trunk/tools/subversion/user-management/modify-ldap-user |
— | — | @@ -21,6 +21,7 @@ |
22 | 22 | parser.add_option("--gid", action="store", dest="gidNumber", help="Set the user's gid") |
23 | 23 | parser.add_option("--uid", action="store", dest="uidNumber", help="Set the user's uid") |
24 | 24 | parser.add_option("--cn", action="store", dest="cn", help="Set the user's CN") |
| 25 | + parser.add_option("--mail", action="store", dest="mail", help="Set the user's email address") |
25 | 26 | parser.add_option("--firstname", action="store", dest="givenName", help="Set the user's first name") |
26 | 27 | parser.add_option("--lastname", action="store", dest="sn", help="Set the user's last name") |
27 | 28 | parser.add_option("--replacekeys", action="store", dest="replaceKeyLocation", help="Replaces all of the user's keys") |
— | — | @@ -95,6 +96,8 @@ |
96 | 97 | NewPosixData['givenName'] = options.givenName |
97 | 98 | if options.cn: |
98 | 99 | NewPosixData['cn'] = options.cn |
| 100 | + if options.mail: |
| 101 | + NewPosixData['mail'] = options.mail |
99 | 102 | |
100 | 103 | if PosixData == NewPosixData: |
101 | 104 | sys.stderr.write("No changes to make; exiting.\n") |
Index: trunk/tools/subversion/user-management/add-ldap-user |
— | — | @@ -25,6 +25,7 @@ |
26 | 26 | parser.add_option("--cn", action="store", dest="cn", help="The user's CN (default: firstname + lastname, or username, if first/last not set)") |
27 | 27 | parser.add_option("--firstname", action="store", dest="givenName", help="The user's first name (default: username)") |
28 | 28 | parser.add_option("--lastname", action="store", dest="sn", help="The user's last name (default: username)") |
| 29 | + parser.add_option("--mail", action="store", dest="mail", help="The user's email address") |
29 | 30 | parser.add_option("--dry-run", action="store_true", dest="dryRun", help="Dry run mode (no changes)") |
30 | 31 | (options, args) = parser.parse_args() |
31 | 32 | |
— | — | @@ -121,6 +122,9 @@ |
122 | 123 | userEntry['sn'] = sn |
123 | 124 | userEntry['cn'] = cn |
124 | 125 | |
| 126 | + if options.mail: |
| 127 | + userEntry['mail'] = options.mail |
| 128 | + |
125 | 129 | if not dryRun: |
126 | 130 | modlist = ldap.modlist.addModlist(userEntry) |
127 | 131 | ds.add_s(dn, modlist) |