Shell scripts Change Multiple users password. Read Oracle Username password SID from single file and pass it to shell. Expert in grasping any new technology, Interested in Sharing the knowledge. How can I solve this problem ? First, you need to modify the /etc/sudoers file to add a rule that allows the hudson user to become the other user for the script in question. Ubuntu – Run a shell script as another user that has no password. sudo (“superuser do”) is nothing but a tool for Linux or Unix-like systems to run commands/programs as another user. id=$2 new=new_$diff I heard the su command will do that work but it prompt for the password. Security policies may restrict uids … If it is only required to change the user … What to Know To switch to the root user on Ubuntu-based distributions, enter sudo su in the command terminal. What I want is to run the script as another user. Here i am sharing 3 shell scripts change multiple users password. Add config in NRPE file and copy the script to remote... Hi Naik, you can use 7MTT tool or snapmirror method to... Hi Ravi, The article is really very good. Now try to su to the account postgres as the user aaronk, the shell should not prompt you to enter a password: $ sudo su - postgres Switch to Other User Without Password That’s all for now! The su command lets you switch the current user to any other user. As I do not want the password to be in plain text, I've tried to use java to encrypt and decrypt it but I am not sure how can I pass the decrypted password to the script. To restore the previous session, enter exit or press (where EscChar is normally the cent sign). Hi friends, I am going to show you a quick solution to reset multiple users password on single go or single shell script. You will need to write a script for the root operations along with a helper executable that can invoke it with the appropriate privileges. Use password in scp command in shell script Many times we may have to move the files to another server, to copy files to other server we need username & password of user. I have written a script to automate a software install. If you are in the shell under your "username", you can change it to another user (say root) using the su command..