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
Hello All,
Here I am trying to login a Linux machine as admin user from a Solaris box..
& then switch to root user..
Code I use:
ssh admin@<IP> << END
su - root << A
echo "Hello I am logged in as root"
exit
A
exit
END
But the error I get..
su: must be run from a... (3 Replies)
Discussion started by: ailnilanjan
3 Replies
4. UNIX for Dummies Questions & Answers
Usually in solaris/Linux servers , when you do an su - username (space before and after the hyphen) the user's .profile should get sourced. But in the below linux machine it is not. As you see below ORACLE_HOME variable is not being set.
# uname -a
Linux revaltb214 2.6.18-238.el5 #1 SMP Sun... (7 Replies)
Discussion started by: John K
7 Replies
5. 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
6. 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
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,
I have to switch to a different user and execute certain commands and then come back to the original user
Ex: My id is 'usstage'. I need to switch to 'apstage', souce a script there, execute a function and then get back again to usstage.
Please note that I do not have expect installed... (4 Replies)
Discussion started by: sugan
4 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
.K5LOGIN(5) File Formats Manual .K5LOGIN(5)
NAME
.k5login - Kerberos V5 acl file for host access.
DESCRIPTION
The .k5login file, which resides in a user's home directory, contains a list of the Kerberos principals. Anyone with valid tickets for a
principal in the file is allowed host access with the UID of the user in whose home directory the file resides. One common use is to place
a .k5login file in root's home directory, thereby granting system administrators remote root access to the host via Kerberos.
EXAMPLES
Suppose the user "alice" had a .k5login file in her home directory containing the following line:
bob@FUBAR.ORG
This would allow "bob" to use any of the Kerberos network applications, such as telnet(1), rlogin(1), rsh(1), and rcp(1), to access alice's
account, using bob's Kerberos tickets.
Let us further suppose that "alice" is a system administrator. Alice and the other system administrators would have their principals in
root's .k5login file on each host:
alice@BLEEP.COM
joeadmin/root@BLEEP.COM
This would allow either system administrator to log in to these hosts using their Kerberos tickets instead of having to type the root pass-
word. Note that because "bob" retains the Kerberos tickets for his own principal, "bob@FUBAR.ORG", he would not have any of the privileges
that require alice's tickets, such as root access to any of the site's hosts, or the ability to change alice's password.
SEE ALSO
telnet(1), rlogin(1), rsh(1), rcp(1), ksu(1), telnetd(8), klogind(8)
.K5LOGIN(5)