![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| LDAP user password reset script | em23 | SUN Solaris | 1 | 12-29-2008 07:02 AM |
| password verification verify password of a user for only first 8 characters | amitpansuria | UNIX for Advanced & Expert Users | 12 | 10-23-2008 11:03 AM |
| changing unix user password using script | mani_um | AIX | 5 | 09-05-2007 12:33 AM |
| How would I telnet & change user password automatically in a script | darthur | UNIX for Dummies Questions & Answers | 4 | 01-14-2002 11:40 AM |
| How to add new user and password through script | ehsan | Shell Programming and Scripting | 1 | 11-06-2001 05:18 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
provide a user password from a script
Hi all,
passwd <username> < /var/adm/passwd.txt cat /var/adm/passwd.txt abcd1234 abcd1234 when I run this from the script, it comes with: New password: It is not able to pick from the location /var/adm/passwd.txt. thanks in advance. |
|
||||
|
Padow,
Is "expect" the only way around to get this done. There has to be another way other than expect. Only my guess though..I can afford to put expect on one of the box to get it done but this has to be rolled out on number of servers and I do not think I will be able to have "expect" in all other servers. |
|
||||
|
The best way is just to manually type the password in at the password prompt, rather than putting a password in a script anyway.
I wouldn't recommend it unless you are very sure you know what you are doing, but you could write a script to edit /etc/shadow or /etc/security/password depending on your OS and insert the password hash into the correct field. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|