Switch environments on a single unix server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Switch environments on a single unix server
# 1  
Old 02-25-2009
Switch users on a single unix server

Hi All,


I have written a script for a particular user say tren212 ,which checks the disk space of the user.
I wish to check the disk space of another user say tren213 in the same script.

How can I do the same?

I have tried using su command but it asks for the password at the time of execution of the script and exits from the script once the password is given.

Can anyone guide me here??

Thanks

Last edited by Taranjeet Singh; 02-25-2009 at 02:05 PM.. Reason: Question not explanatory
# 2  
Old 02-25-2009
Try using sudo
# 3  
Old 02-25-2009
or try using ssh with public/private keys assigned to tren213 and others as needed.
# 4  
Old 02-25-2009
Switch users on a single unix server

Hi,

I am new to this sudo and things.

Can you please guide me how to implement this logic in my script?


Thanks
# 5  
Old 02-26-2009
Switch users on a single unix server

Hi ,

I tried using sudo but I am not authorised to use it.

Is there any other workaround fro my problem??

Please advice.

Any help may be very fruitful for me..

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Switch Desktop Environments via Terminal

Hi All, Does anyone know if it's possible to switch desktop environments via the terminal? I'm writing a script to install Cinnamon on Ubuntu and I would then like to remove unity but at the moment I have to ask the user to log out, log in with cinnamon and then continue the script to remove... (1 Reply)
Discussion started by: maerlyngb
1 Replies

2. Programming

Switch Technology from .NET to UNIX Shell

Hello friends, I started my career with VB.6.0 in 2007, In 2008 moved in VB.NET window application programming and then for web application programming with C#,ASP.NET with different databse like Oracle,MySQL and SQL Server.Currently I have 4.7 years experience in .NET application and worked... (8 Replies)
Discussion started by: Amit Verma
8 Replies

3. UNIX for Advanced & Expert Users

How to Switch off a Unix machine abruptly

Hi Folks, My UNIX machine is placed geographically in another location. I have a remote access towards it. I want to abruptly switch off my unix machine through remote connection. Is it possible through any UNIX commands? I practically want to power off a PC , something like unplugging a power... (12 Replies)
Discussion started by: gjasper
12 Replies

4. UNIX for Advanced & Expert Users

Help with server switch shell script

I need a script to change server automatically after performing some operations. The command for changing server is ssh username@servername . Then a prompt comes to enter a password. Then i need to perform some opertaions on the other server. How can i do this in a script? (1 Reply)
Discussion started by: pratikm23
1 Replies

5. Solaris

Find Brocade SAN switch’s IP in Sun server?

We have a Sun M5000 connecting to a Brocade SAN switch. I don't know the IP of the Brocade switch and don't want to use its serial port to get the info. How can I find the IP of the Brocade switch under Solaris 10? Snoop is not supported by Solaris multipathing. What other tools can I use to find... (6 Replies)
Discussion started by: aixlover
6 Replies

6. Shell Programming and Scripting

Switch over from one UNIX system to another

Hi, I am new to UNIX shell script programming. I am using "putty" software to login remote UNIX system(123.com) . After login , i want to switch to another remote UNIX system (124.com) in same "putty" window. Could you Please let me know how to do and very thankful if anyone provide... (1 Reply)
Discussion started by: jagadish.g
1 Replies

7. Shell Programming and Scripting

Help needed in switch case handling in UNIX

Hi, In below code, i am expecting the output has Bye Bye But i am getting has Bye Hi Code: #!/usr/bin/bash var="Hi" cat txt.txt | while read var1 do next="Bye" case $var in Hi) (1 Reply)
Discussion started by: Balamani
1 Replies

8. Answers to Frequently Asked Questions

Unix environments for MS Windows

We often get questions about how to provide a Unix environment under Windows. Mircosoft has several OS's that collectively are called Windows. Most users are running a recent Microsoft OS with an NT kernel, usually Windows XP. The solutions in this thread may not work on very old Microsoft... (0 Replies)
Discussion started by: Perderabo
0 Replies

9. UNIX for Dummies Questions & Answers

Unix environments to fiddle around with

I'm a newbie and I was wondering if there were any public unix environments on the internet I could telnet to and fiddle around with?? (1 Reply)
Discussion started by: eloquent99
1 Replies
Login or Register to Ask a Question