script a response to a password prompt
I have a script that joins a linux user to AD. It runs the net ads join -U userid@domain and it always prompts for a password. I would like to store that password as a variable and provide it as input to the net ads join command that way the script doesn't stop for user input. Is that possible?
|
Quote:
Quote:
|
Code:
man net Quote:
|
Whoops i saw that but thought the % was Windows or something. Thanks guys. i used net ads join -U ${ADMIN_ACCT}@${DOMAIN}%${PASSWORD} so i could pass all the variables in from command line.
|
Quote:
|
I had to put mine in single quote, most likely due to special characters in the password
net ads join -U 'user%password' |
All times are GMT -5. The time now is 11:24 AM. |