Sponsored Content
Top Forums Shell Programming and Scripting script to change password for all users Post 302346868 by dr46014 on Monday 24th of August 2009 10:14:32 AM
Old 08-24-2009
Code:
user_id,old_password,new_password
dkrout,P@55word,dk@11word
sdas,P@55word,sd@12word
bkpradhan,P@55word,bk@19word
pthn,P@55word,pt@11word
nsap,P@55word,ns@11word


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 ----------

Quote:
Originally Posted by dr46014
Code:
user_id,old_password,new_password
dkrout,P@55word,dk@11word
sdas,P@55word,sd@12word
bkpradhan,P@55word,bk@19word
pthn,P@55word,pt@11word
nsap,P@55word,ns@11word


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.
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.

Last edited by vgersh99; 08-24-2009 at 10:53 AM.. Reason: code tags, PLEASE!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How do I change users in a script???

Hi there, Does anyone know of a way I can become a different user in a script? I need to run a script as one user (not root), and change to another user half way through. It stops and asks me for the password, and I can't find a way to feed the password in through the script. Thanks (2 Replies)
Discussion started by: chorgan
2 Replies

2. Shell Programming and Scripting

Modify users password via script?

Ok, first off, I'm working on a Vmware ESX server, which I guess is loosely based off of Red Hat 9. But I'm brand new to it (today), so be nice. I'm trying to write a useradd script that will create some users, generate a password, and set their password to this newly generated password. ... (2 Replies)
Discussion started by: paqman
2 Replies

3. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

4. Shell Programming and Scripting

Help- Change the password of users to common one

Hi all I have some 106 users of which i need to change the password of them to a common one. I dont know their paswword. But i need to reset them to a common one. How can i do this with a shell script? It would be a great help if some one can help to sort out this.:b::b: I know it can be... (0 Replies)
Discussion started by: Tuxidow
0 Replies

5. Solaris

How to enforce all users to change their password

Hi All, How to enforce all users to change their password when they try to login. I am having Solaris 9 and 10. Even it would be much better if anyone can say to enforce all users to change their password next morning they login. Thanks in advance, Deepak (3 Replies)
Discussion started by: naw_deepak
3 Replies

6. UNIX for Advanced & Expert Users

Update users password change time

Hello - Is this possible on Unix machines? Can we update user password change time? (6 Replies)
Discussion started by: manju--
6 Replies

7. Solaris

Change password for users

I am on SunOS SolarisServer 5.11 11.1 i86pc i386 i86pc , I am trying to change password for a user,but I get the following message.I cannot find any google help on the matter.can anyone help? root@SolarisServer:~# passwd passwd: Changing password for stain Please try again Please try... (6 Replies)
Discussion started by: cbtshare
6 Replies

8. Shell Programming and Scripting

Bulk NIS Users Password Change

Hi All, I am having Solaris 5.10 acting as NIS. How do i change multiple user password in NIS in a batch. I have predefined users with their passwords to be set: Example: user1 password1 user2 password2 Pls advise. (0 Replies)
Discussion started by: yogajwa
0 Replies

9. Shell Programming and Scripting

Shell script for creating multiple users with password

for UserName in `cat users` ; do useradd -d /u02 -s /usr/libexec/openssh/sftp-server -G ftp-users $UserName ; PassWord=$( echo $( tr '' '' <<< ${UserName:0:1} )${UserName:1} ) ; echo "$PassWord@123" | passwd $UserName --stdin ; done can some one explain what the bold text do Please use... (5 Replies)
Discussion started by: James0806
5 Replies

10. AIX

Change password for many users on an AIX server

Hi I want to change password for around 100 users on an aix server. I have the list of those 100 users with me. instead of doing # passwd username for all the 100 users one by one, can you please help with a script through which we can change the password for all the 100 users in a... (2 Replies)
Discussion started by: newtoaixos
2 Replies
SYSTEMD-ASK-PASSWORD-CONSOLE.SERVICE(8) 	       systemd-ask-password-console.service		   SYSTEMD-ASK-PASSWORD-CONSOLE.SERVICE(8)

NAME
systemd-ask-password-console.service, systemd-ask-password-console.path, systemd-ask-password-wall.service, systemd-ask-password-wall.path - Query the user for system passwords on the console and via wall SYNOPSIS
systemd-ask-password-console.service systemd-ask-password-console.path systemd-ask-password-wall.service systemd-ask-password-wall.path DESCRIPTION
systemd-ask-password-console.service is a system service that queries the user for system passwords (such as hard disk encryption keys and SSL certificate passphrases) on the console. It is intended to be used during boot to ensure proper handling of passwords necessary for boot. systemd-ask-password-wall.service is a system service that informs all logged in users for system passwords via wall(1). It is intended to be used after boot to ensure that users are properly notified. See the developer documentation[1] for more information about the system password logic. Note that these services invoke systemd-tty-ask-password-agent(1) with either the --watch --console or --watch --wall command line parameters. SEE ALSO
systemd(1), systemd-tty-ask-password-agent(1), wall(1) NOTES
1. developer documentation https://www.freedesktop.org/wiki/Software/systemd/PasswordAgents systemd 237 SYSTEMD-ASK-PASSWORD-CONSOLE.SERVICE(8)
All times are GMT -4. The time now is 04:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy