|
Lines 3-9
Link Here
|
| 3 |
# Univention Admin Modules |
3 |
# Univention Admin Modules |
| 4 |
# command line frontend to univention-directory-manager (module) |
4 |
# command line frontend to univention-directory-manager (module) |
| 5 |
# |
5 |
# |
| 6 |
# Copyright 2004-2010 Univention GmbH |
6 |
# Copyright 2004-2011 Univention GmbH |
| 7 |
# |
7 |
# |
| 8 |
# http://www.univention.de/ |
8 |
# http://www.univention.de/ |
| 9 |
# |
9 |
# |
|
Lines 71-76
Link Here
|
| 71 |
out.append('create options:') |
71 |
out.append('create options:') |
| 72 |
out.append(' --%-30s %s' % ('binddn', 'bind DN')) |
72 |
out.append(' --%-30s %s' % ('binddn', 'bind DN')) |
| 73 |
out.append(' --%-30s %s' % ('bindpwd', 'bind password')) |
73 |
out.append(' --%-30s %s' % ('bindpwd', 'bind password')) |
|
|
74 |
out.append(' --%-30s %s' % ('bindpwdfile', 'bind password file')) |
| 74 |
out.append(' --%-30s %s' % ('position', 'Set position in tree')) |
75 |
out.append(' --%-30s %s' % ('position', 'Set position in tree')) |
| 75 |
out.append(' --%-30s %s' % ('set', 'Set variable to value, e.g. foo=bar')) |
76 |
out.append(' --%-30s %s' % ('set', 'Set variable to value, e.g. foo=bar')) |
| 76 |
out.append(' --%-30s %s' % ('superordinate', 'Use superordinate module')) |
77 |
out.append(' --%-30s %s' % ('superordinate', 'Use superordinate module')) |
|
Lines 83-88
Link Here
|
| 83 |
out.append('modify options:') |
84 |
out.append('modify options:') |
| 84 |
out.append(' --%-30s %s' % ('binddn', 'bind DN')) |
85 |
out.append(' --%-30s %s' % ('binddn', 'bind DN')) |
| 85 |
out.append(' --%-30s %s' % ('bindpwd', 'bind password')) |
86 |
out.append(' --%-30s %s' % ('bindpwd', 'bind password')) |
|
|
87 |
out.append(' --%-30s %s' % ('bindpwdfile', 'bind password file')) |
| 86 |
out.append(' --%-30s %s' % ('dn', 'Edit object with DN')) |
88 |
out.append(' --%-30s %s' % ('dn', 'Edit object with DN')) |
| 87 |
out.append(' --%-30s %s' % ('arg', 'Edit object with ARG')) |
89 |
out.append(' --%-30s %s' % ('arg', 'Edit object with ARG')) |
| 88 |
out.append(' --%-30s %s' % ('set', 'Set variable to value, e.g. foo=bar')) |
90 |
out.append(' --%-30s %s' % ('set', 'Set variable to value, e.g. foo=bar')) |
|
Lines 99-104
Link Here
|
| 99 |
out.append('remove options:') |
101 |
out.append('remove options:') |
| 100 |
out.append(' --%-30s %s' % ('binddn', 'bind DN')) |
102 |
out.append(' --%-30s %s' % ('binddn', 'bind DN')) |
| 101 |
out.append(' --%-30s %s' % ('bindpwd', 'bind password')) |
103 |
out.append(' --%-30s %s' % ('bindpwd', 'bind password')) |
|
|
104 |
out.append(' --%-30s %s' % ('bindpwdfile', 'bind password file')) |
| 102 |
out.append(' --%-30s %s' % ('dn', 'Remove object with DN')) |
105 |
out.append(' --%-30s %s' % ('dn', 'Remove object with DN')) |
| 103 |
out.append(' --%-30s %s' % ('superordinate', 'Use superordinate module')) |
106 |
out.append(' --%-30s %s' % ('superordinate', 'Use superordinate module')) |
| 104 |
out.append(' --%-30s %s' % ('arg', 'Remove object with ARG')) |
107 |
out.append(' --%-30s %s' % ('arg', 'Remove object with ARG')) |
|
Lines 114-119
Link Here
|
| 114 |
out.append('move options:') |
117 |
out.append('move options:') |
| 115 |
out.append(' --%-30s %s' % ('binddn', 'bind DN')) |
118 |
out.append(' --%-30s %s' % ('binddn', 'bind DN')) |
| 116 |
out.append(' --%-30s %s' % ('bindpwd', 'bind password')) |
119 |
out.append(' --%-30s %s' % ('bindpwd', 'bind password')) |
|
|
120 |
out.append(' --%-30s %s' % ('bindpwdfile', 'bind password file')) |
| 117 |
out.append(' --%-30s %s' % ('dn', 'Move object with DN')) |
121 |
out.append(' --%-30s %s' % ('dn', 'Move object with DN')) |
| 118 |
out.append(' --%-30s %s' % ('position', 'Move to position in tree')) |
122 |
out.append(' --%-30s %s' % ('position', 'Move to position in tree')) |
| 119 |
out.append('') |
123 |
out.append('') |
|
Lines 386-392
Link Here
|
| 386 |
remove_referring=0 |
390 |
remove_referring=0 |
| 387 |
recursive=1 |
391 |
recursive=1 |
| 388 |
# parse options |
392 |
# parse options |
| 389 |
longopts=['position=', 'dn=', 'arg=', 'set=', 'append=', 'remove=', 'superordinate=', 'option=', 'append-option=', 'filter=', 'tls=', 'ignore_exists', 'logfile=', 'policies=', 'binddn=', 'bindpwd=', 'customattribute=', 'customattribute-remove=','policy-reference=','policy-dereference=','remove_referring','recursive'] |
393 |
longopts=['position=', 'dn=', 'arg=', 'set=', 'append=', 'remove=', 'superordinate=', 'option=', 'append-option=', 'filter=', 'tls=', 'ignore_exists', 'logfile=', 'policies=', 'binddn=', 'bindpwd=','bindpwdfile=', 'customattribute=', 'customattribute-remove=','policy-reference=','policy-dereference=','remove_referring','recursive'] |
| 390 |
try: |
394 |
try: |
| 391 |
opts, args=getopt.getopt(arglist[3:], '', longopts) |
395 |
opts, args=getopt.getopt(arglist[3:], '', longopts) |
| 392 |
except getopt.error, msg: |
396 |
except getopt.error, msg: |
|
Lines 430-435
Link Here
|
| 430 |
policyOptions=" " |
434 |
policyOptions=" " |
| 431 |
elif opt == '--binddn': |
435 |
elif opt == '--binddn': |
| 432 |
binddn=val |
436 |
binddn=val |
|
|
437 |
elif opt == '--bindpwdfile': |
| 438 |
if not os.access(val,os.R_OK): |
| 439 |
out.append('WARNING: file not found: %s' % val) |
| 440 |
return out + ["OPERATION FAILED"] |
| 441 |
bindpwd=open(val).read() |
| 442 |
if bindpwd.rstrip('\n\r'): |
| 443 |
bindpwd=bindpwd[:-1] |
| 433 |
elif opt == '--bindpwd': |
444 |
elif opt == '--bindpwd': |
| 434 |
bindpwd=val |
445 |
bindpwd=val |
| 435 |
elif opt == '--dn': |
446 |
elif opt == '--dn': |