We have a server where we have a number of user ids and we also have the list of old passwords in a CSV file.
Now we want to change the password of all the users and assign them a default password.Can we write a shell script to do that.
I am planning to read the user name and corresponding password from CSV file.But how to login to the server with the same user and change password
with passwd -r file command.
Once i type login the exported paramter values are lost.
This is a sample CSV file I am having.I want to change the password to new password.I want to make everythin automated so that after the script run is complete password should change for all users and automated mail will be sent to them.
---------- Post updated at 07:44 PM ---------- Previous update was at 07:17 PM ----------
one thing i forgot to mention..i am not the root user.I am an ordinary user who wants to change the password.It is same as loggin in to individaul user using their password and change it and send a mail.To avoid manual work i want to automate it.
sorry,i don't know how if you can't access root,i just tried 'sudo',didn't work
i guess its for the security,you need to be root to change others password 'in script'
we can add another column and have the corresponding mail ids ... not unix mail...and use mailx -s .... that is quite possible...i dont understand the use of system here
---------- Post updated at 10:13 PM ---------- Previous update was at 10:09 PM ----------
this is not working in my system ....
---------- Post updated at 10:26 PM ---------- Previous update was at 10:13 PM ----------
won't this ask for old password and confirmation password if i am running it from root..as i dont have that access its not working .....
will it work in Sun Solaris too ??