10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
I need create a script that must switch user and then must execute
certain commands, sadly neither my user nor the second user have no privileges
for su - ,
I've tried everything but seems su doesn't accept input redirection,
please help me,
... (4 Replies)
Discussion started by: ooilinlove
3. Shell Programming and Scripting
I need to list users in /etc/passwd with root's GID or UID or /root as home directory
If we have these entries in /etc/passwd
baduser1:x:0:300::/home/baduser1:/bin/bash... (6 Replies)
Discussion started by: anil510
4. 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
5. 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
spawn su su4098
tcpdump -i wlan0
however, in... (1 Reply)
Discussion started by: esolve
I am new to Solaris and when i am trying to Switch to root login from user, system throws message saying permissions denied...
Steps I Followed:
Created a user and logged into that user by SU username
tried to come back to root but system throws message "permissions denied"
... (7 Replies)
Discussion started by: VijaySolaris
7. UNIX for Dummies Questions & Answers
I've been through many threads before i decide to create a separate thread.
I can't really find the solution to my (simple) problem.
Here's what I'm trying to achieve:
As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user.
The only to achieve this is to... (1 Reply)
Discussion started by: canar
8. Shell Programming and Scripting
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
9. UNIX for Advanced & Expert Users
I would like to know if there is anyway that I can pinpoint the user before/after he connects to the root? Also, I'm trying to find out what are the commands he inputs under root access. (6 Replies)
Discussion started by: pointgetter0
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