Make password prompt automatic
This commit is contained in:
parent
f3771a77c7
commit
d07c61cf1e
1 changed files with 3 additions and 2 deletions
|
@ -82,7 +82,8 @@ parser.add_option( "-P", "--pwd",
|
||||||
dest="pwd",
|
dest="pwd",
|
||||||
action="store",
|
action="store",
|
||||||
type='string',
|
type='string',
|
||||||
help="LDAP bind password. Specify '-P -' to ask for a prompt.")
|
help="LDAP bind password",
|
||||||
|
default=None)
|
||||||
|
|
||||||
parser.add_option( "-b", "--basedn",
|
parser.add_option( "-b", "--basedn",
|
||||||
dest="basedn",
|
dest="basedn",
|
||||||
|
@ -177,7 +178,7 @@ if options.touch and not options.attrs:
|
||||||
logging.info('Force option attrs on touch mode')
|
logging.info('Force option attrs on touch mode')
|
||||||
options.attrs=True
|
options.attrs=True
|
||||||
|
|
||||||
if options.pwd == '-':
|
if options.dn and options.pwd is None:
|
||||||
options.pwd=getpass.getpass()
|
options.pwd=getpass.getpass()
|
||||||
|
|
||||||
excl_attrs=[]
|
excl_attrs=[]
|
||||||
|
|
Loading…
Reference in a new issue