09-15-2003
Urgent !!! - Script to Change passwords in unix
I have SunOs 5.8. I need to change password using a unix shell script. I have tried to pipe the passwords to the passwd command but does not work. Pls provide a script to change passwds of a list of users using a shell script.
( I have also tried crypt() but did not work)
The flow of the program...
1. A list of users with passwords to be given to them.
2. Script to read users and their passwords fron the list file( its a txt)
3. use passwd command to change or set the password.
You can also provide any alternative way for doing above using .shadow or .passwd file. It will be appreciated.
I need this urgent...
Awaiting help ...
Tofani
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
if I am dialling in remotely it takes a long time to launch dxaccounts on Tru64 or SAM on our HP boxes.
Can anyone tell me how to reset users NIS passwords without knowing their old password from the command line?
When I use yppasswd it prompts me for the old password even though I am... (1 Reply)
Discussion started by: sjmolloy
1 Replies
2. Shell Programming and Scripting
We have almost 100+ Unix/Linux servers, on which I have account.
Does anybody have a batch script which can do the following :
- check if my password is correct
- change my password
We use SFTP/SSH on Linux. The solution should force reading of password from command line. ( Passwordless... (1 Reply)
Discussion started by: lucknowm
1 Replies
3. Shell Programming and Scripting
I am trying to write a script to change passwords for the same user on multiple servers.
My environment runs purely ssh / scp not rsh / rcp and therefore coping using rcp is not an option.
I have been playing with expect to perform tasks but think there must be a better way.
Has anyone got... (7 Replies)
Discussion started by: stolz
7 Replies
4. UNIX for Dummies Questions & Answers
Hi all I am using tru64 Unix and I want to use batch file which makes me to change all user passwords at the same time ,instead of changing everyone separately. Please could anyone help me to do that. bye. (2 Replies)
Discussion started by: ahmedbashir
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I want to change the password of unix users on a number of servers.My plan was to ssh to all the servers in a shell script and use the passwd command. I tried to do so but everytime i run it i get this error.
ssh -x -n -l user1 host passwd
Changing password for "user1"
3004-709 Error... (3 Replies)
Discussion started by: poojabhat
3 Replies
6. UNIX for Advanced & Expert Users
I've been using various versions of UNIX and Linux since 1993, and I've never run across one that showed your password as you type it in when you log in, or one that stored passwords in plain text rather than encrypted. I'm writing a script for work for a security audit, and two of the... (5 Replies)
Discussion started by: Anne Neville
5 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I'm new to this site, so my apologies if this is posted to the wrong board.
I'm the student administrator of a small computer science lab (20 Win 7 PCs) at a university. The logins to the PCs are handled by samba (v. 3.5.8) on a CentOS server (kernel v. 2.6.9-100.ELsmp). Recently I ... (1 Reply)
Discussion started by: kerona
1 Replies
8. Shell Programming and Scripting
Hello Experts,
Need some direction on creating shell script for following environment:
We have about 20 people in the team working as Oracle DBA's (sysdba's and appdba's). Total Servers which is a mix of Unix and Linux are 200. We do not have Root user access on any of the servers and... (3 Replies)
Discussion started by: sha2402
3 Replies
9. Shell Programming and Scripting
Hi All,
I am trying to create a script with the help of while and expect loop to do the following:
1. script will pick up the servers one by one from server_list file and will do ssh to it.
2. for each server it will change the password of user test1.
3. script should also provide logs for... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies
LEARN ABOUT REDHAT
sslpasswd
PASSWD(1) OpenSSL PASSWD(1)
NAME
passwd - compute password hashes
SYNOPSIS
openssl passwd [-crypt] [-1] [-apr1] [-salt string] [-in file] [-stdin] [-noverify] [-quiet] [-table] {password}
DESCRIPTION
The passwd command computes the hash of a password typed at run-time or the hash of each password in a list. The password list is taken
from the named file for option -in file, from stdin for option -stdin, or from the command line, or from the terminal otherwise. The Unix
standard algorithm crypt and the MD5-based BSD password algorithm 1 and its Apache variant apr1 are available.
OPTIONS
-crypt
Use the crypt algorithm (default).
-1 Use the MD5 based BSD password algorithm 1.
-apr1
Use the apr1 algorithm (Apache variant of the BSD algorithm).
-salt string
Use the specified salt. When reading a password from the terminal, this implies -noverify.
-in file
Read passwords from file.
-stdin
Read passwords from stdin.
-noverify
Don't verify when reading a password from the terminal.
-quiet
Don't output warnings when passwords given at the command line are truncated.
-table
In the output list, prepend the cleartext password and a TAB character to each password hash.
EXAMPLES
openssl passwd -crypt -salt xx password prints xxj31ZMTZzkVA.
openssl passwd -1 -salt xxxxxxxx password prints $1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a..
openssl passwd -apr1 -salt xxxxxxxx password prints $apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0.
0.9.7a 2002-10-03 PASSWD(1)