10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
Hi all,
I have a small problem. When I log in as root and try to switch to any other user using su -user, then it is giving an error saying libncurses.so permission denied. Can you help me?
Thank you in advance.
Sai. (1 Reply)
Discussion started by: sai2krishna
1 Replies
3. Shell Programming and Scripting
hi, I need to switch users in a script
I'm newbee to expect
I wrote two files
1 sudo.exp, since su4098 is used as root in my laptop
#!/usr/bin/expect
spawn su su4098
expect *Password:*
send mypsw\n
interact
2 test.sh
ls
./sudo.exp
tcpdump -i wlan0
su esolve
ls
however, in... (1 Reply)
Discussion started by: esolve
1 Replies
4. Shell Programming and Scripting
Hi Gurus,
I have a script that requires me to switch from local user to root. Anyone who has an idea on this since when i switch user to root it requires me to input root password.
It seems that i need to use expect module here, but i don't know how to create the object for this.
... (1 Reply)
Discussion started by: linuxgeek
1 Replies
5. Shell Programming and Scripting
I want to switch as another user without using password .Is it posiible ? I have one server B and I have logged in as username u1 but I want to login to that same server using username as u2 but I don't want to give the password for u2. (3 Replies)
Discussion started by: maitree
3 Replies
6. AIX
Is it possible to switch to root(if allowed) and then with root privileges switch to another user account "ABC"? To further explain the scenario, ABC is an account which has sugroups=su2DEF and root is not part of su2DEF group. but, given that root can switch to any account(correct me if I am... (7 Replies)
Discussion started by: mtwain
7 Replies
7. 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
8. Shell Programming and Scripting
Hi All, I have been trying to get an Expect program to communicate with a Remote Power Switch which will eventually log in, and then turn on/off certain outlets. For some reason, I can't get through the log in procedure with this Switch. When you first spawn the telnet, you get the Switch... (1 Reply)
Discussion started by: mrjgs70
1 Replies
9. UNIX for Dummies Questions & Answers
Hi
I have written a script to switch user and do some operations. I used expect command it doesn't work. It switches the user and waits for the Password to be entered manually. Also, i tried to fetch the pasword from passwd file, it didn't work.The script is as below:
... (4 Replies)
Discussion started by: Sapna_Sai
4 Replies
10. Shell Programming and Scripting
Is is possible switch user from a non-root user to root user without entering the password interactively inside a korn shell script which is run by a non-root user?
e.g. I have a non-root user called infodba who is in dba group and I want to create a shell script which is executed by infodba... (5 Replies)
Discussion started by: stevefox
5 Replies