Help with switching the users


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help with switching the users
# 1  
Old 12-10-2012
Help with switching the users

Hello.
I am using a instance of Centos 5.5, I currently have two users root and zetaris, but when I try to switch the user from root
su zetaris or su - zetaris the next command line shows bash-3.2$ and stops there. Further there is no response from instance.
Please help me with this problem. I have to switch the user for continuing my tasks. I am running the instance on Cloud VM.

I found the list of users
Code:
cat /etc/passwd | grep "/bin/bash" | cut -d: -f1

root
zetaris

Please help.

Last edited by Scott; 12-10-2012 at 02:45 AM.. Reason: Code tags
# 2  
Old 12-10-2012
Yes? And what is wrong with it? doing a su is opening a shell under a new UID...
What are you trying to achieve?
# 3  
Old 12-10-2012
What do you mean by "stops there"? Does it not let you send any more commands to the shell? I'm not sure I understand the issue.
# 4  
Old 12-11-2012
man sudo to run the command as other user.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Create multiple users with individual passwords to users

hi, i am new to shell scripts i write a shell script to create multiple users but i need to give passwords to that users while creating users, command to write this script (1 Reply)
Discussion started by: DONFOX
1 Replies

2. Programming

Switching over to C++

Hi, We've been using a perl script to extract datas from several logs to generate a report. I've been asked to rewrite the code in C++. I want to know if it is wise to have a code in C++ and will it be more faster than Perl? (23 Replies)
Discussion started by: Ribosome
23 Replies

3. Shell Programming and Scripting

Switching between users on UNIX without private key (intentional)

Hello Everyone, I'm new to unix and having trouble with switching users s_user='sample_user', I need to connect to a remote server using the user "sampleuser" copy files on that remote server. However I am not allowed to add a private key to that same server nor add scripts on sampleuser's... (5 Replies)
Discussion started by: AmazingTyagoman
5 Replies

4. Solaris

The switching in the different AP's

HI, I am using the windows 2003 server R2 in there we are using the putty as to access the different AP's now from the primary AP i want to login to several different AP's using a script what the script will do is :- input a text file in which list of different ap's and the corresponding... (0 Replies)
Discussion started by: amiglani
0 Replies

5. Solaris

To restrict the users not to change the passwords for NIS users

Hi All, How to restrict the NIS users not to change their passwords in for NIS users?? and my NIS user is unable to login to at client location what could be the problem for this ? Any body can help me. Thanks in advance. (1 Reply)
Discussion started by: Sharath Kumar
1 Replies

6. AIX

switching users

Hi All, I used to know a comand that you could log in as another user from root, if you didn't know the password for the account. Can anyone let me know what it is? (2 Replies)
Discussion started by: banchee
2 Replies

7. AIX

Switching users

Hi I want to write a script which can switch between super users.But it asks for the password at the prompt.How can I manage in the script so that it didnt ask me for the password at the prompt. (1 Reply)
Discussion started by: monika
1 Replies

8. Shell Programming and Scripting

switching users

Hi I want to write a script which can switch between super users.But it asks for the password at the prompt.How can I manage in the script so that it didnt ask me for the password at the prompt. (1 Reply)
Discussion started by: monika
1 Replies

9. Shell Programming and Scripting

Switching between two users

Can any one tell me : How we can switch between two users without prompting for the password. (In the SHELL SCRIPT can we fetch the USERID and PASSWORD from a specified file, without using SUDO command)? (2 Replies)
Discussion started by: deepusunil
2 Replies

10. Solaris

Switching between users

Hi folks, could anyone please tell me how can i switch between two users without going thru the su(i.e. root)? is there any such command? thanks in advance, thell (1 Reply)
Discussion started by: thell
1 Replies
Login or Register to Ask a Question