Index: trunk/tools/subversion/user-management/add-labs-user |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | #!/usr/bin/python |
3 | | -import sys, subprocess, ldapsupportlib, scriptconfig, mwclient |
| 3 | +import sys, subprocess, ldapsupportlib, scriptconfig, mwclient, urlparse |
4 | 4 | from optparse import OptionParser |
5 | 5 | |
6 | 6 | def main(): |
— | — | @@ -21,10 +21,11 @@ |
22 | 22 | # Set a random password for the user |
23 | 23 | passwdargs = ['/usr/local/sbin/change-ldap-passwd', '--random', username] |
24 | 24 | passwd = subprocess.Popen(passwdargs, stdout=subprocess.PIPE).communicate()[0] |
| 25 | + passwd = passwd.strip() |
25 | 26 | |
26 | 27 | # Set the user's CN and email address |
27 | | - passwdargs = ['/usr/local/sbin/modify-ldap-user', '--cn=' + options.wikiname, '--mail=' + options.mail, username] |
28 | | - ignore = subprocess.Popen(passwdargs, stdout=subprocess.PIPE).communicate()[0] |
| 28 | + modifyuserargs = ['/usr/local/sbin/modify-ldap-user', '--cn=' + options.wikiname, '--mail=' + options.mail, username] |
| 29 | + ignore = subprocess.Popen(modifyuserargs, stdout=subprocess.PIPE).communicate()[0] |
29 | 30 | |
30 | 31 | # Do an initial log in as the user, which will cause the wiki to create an account |
31 | 32 | # for the user. |