10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
HI
in a server we can't login with root user directly but i can login with different user and then i can switch to root user by su command
Requirement
is there anyway where i can write a script without mentioning password in file as mentioning the root password is not the... (3 Replies)
Discussion started by: scriptor
3 Replies
2. Shell Programming and Scripting
Hi,
I need to switch from local user to root user in a shell script.
I need to make it automated so that it doesn't prompt for the root password.
I heard the su command will do that work but it prompt for the password.
and also can someone tell me whether su command spawns a new shell or... (1 Reply)
Discussion started by: Little
1 Replies
3. Shell Programming and Scripting
I want to switch to another user without password inside shell.
I used the below command and it is not working.
sudo su - user1
user1 is not in the sudoers file. This incident will be reported.
I'm getting the above message.
If I want to add user1 into the sudoers file using... (5 Replies)
Discussion started by: Roozo
5 Replies
4. UNIX for Dummies Questions & Answers
hi,
i want to execute a shell script as a different user. the flow is like this.
there is a html web page from which i have to call a shell script. web server is apache. to call the shell script from html page, a perl script is required.
so the html page calls the perl script and the perl... (2 Replies)
Discussion started by: Little
2 Replies
5. Shell Programming and Scripting
I am writing a korn shell script where i need to switch to root in between and again exit from root to normal user and continue other commands.
Is that possible to switch between these two in the same script? (1 Reply)
Discussion started by: santosh2626
1 Replies
6. Shell Programming and Scripting
now i have logged in username : ramesh in unix
Now i have to created script file to login into another user and have run a command inside that user and after executing the command i have to exit from that user.
Inside script, i have to login into su - ram along with password : haihow and have to... (4 Replies)
Discussion started by: rammm
4 Replies
7. Shell Programming and Scripting
Hi,
script1.sh
script2.sh
script3.sh
From above, script1.sh is the main script which is executed from root user, creates installation directory, changing ownership and execution rights etc..etc.. and finally calls scripot2.sh and script3.sh to create the database as well as for post... (1 Reply)
Discussion started by: milink
1 Replies
8. Shell Programming and Scripting
Hi,
I am trying to create one script where I have to login as another user inside the script to exeute some commands
How can i achieve this?
Many thanks in advance. (4 Replies)
Discussion started by: prarat
4 Replies
9. Shell Programming and Scripting
Hi Experts,
I'm trying to write a shell script to stop few things where i have to use another user to execute a command. Otherwise it will not work.
Your help is really appreciated
Thanks, (16 Replies)
Discussion started by: Afi_Linux
16 Replies
10. Shell Programming and Scripting
Hi,
I wrote a unix script that will perform differnt tasks on bahalf of number of users. I use "sudo" to run the script. The problem is when I execute the command: su - user -c "xxx " > output_file, I get the system output header frm the su command. Is there a way to get rid of it instdead of... (2 Replies)
Discussion started by: nimo
2 Replies