LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   changing passwords in bulk (https://www.linuxquestions.org/questions/linux-newbie-8/changing-passwords-in-bulk-610065/)

vaalu 12-31-2007 12:58 AM

changing passwords in bulk
 
hey
i have obtained the root password of the network of our college computer..could some body tell me how to change the root password of all the systems simultaneously from the system i am using..as for your knowledge our college network has the same user name and password for all the computers..if any body could help me please tell me how to do it
regards

pixellany 12-31-2007 01:11 AM

Quote:

Originally Posted by vaalu (Post 3006332)
hey
i have obtained the root password of the network of our college computer..could some body tell me how to change the root password of all the systems simultaneously from the system i am using..as for your knowledge our college network has the same user name and password for all the computers..if any body could help me please tell me how to do it
regards


On a basic network,I think that the password on an individual machine can be changed only by logging in to that machine as root. Are you perhaps talking about some kind of domain password?

Can you give some details about the network? (and confirm that the systems admin knows what you are doing.)

ghostdog74 12-31-2007 06:15 AM

if your college computers all have SSH installed (or telnet service turned on), you could write scripts to automate the process of changing passwords remotely.

vaalu 01-01-2008 12:58 AM

yes all the computers in my college have ssh installed and i have changed the passwords of three computers by using the ssh command..but i am not much familiar with shell scripting, so could you tell me the format of a script tat can chanfe the passwords in bulk?
regards

ghostdog74 01-01-2008 01:31 AM

here's one approach.

1) Store all your servers whose password needs to be change in a file
eg 10.10.0.1
10.10.1.2
2) in your script:

for line in open the text file for reading
do
ssh user@$line command_to_change password
done

muazfarooqaslam 01-02-2008 06:04 AM

you can easily do this using "expect". Search on google and you will find readymade expect scripts for this.


All times are GMT -5. The time now is 03:27 AM.