Not able to 'su' to other user when rebooting the server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Not able to 'su' to other user when rebooting the server
# 1  
Old 10-06-2008
Not able to 'su' to other user when rebooting the server

Hi All,

I have created one script with starting letter 'S' (Example: Start) and stored in the path "/etc/rc.d/".

This script was called automatically when we reboot the server.
In this script i am using 'su' command to switch other user but it is not working, it giving some error.

su sas -c "pwd ; whoami"

Note:

After done the reboot, same command is working fine but it is not working when we rebooting the server.

Please help me to resolve this issue.
# 2  
Old 10-06-2008
Is it SUN?

What was the OS. Is it SUN microsystem?


Quote:
Originally Posted by Selva_Kumar
Hi All,

I have created one script with starting letter 'S' (Example: Start) and stored in the path "/etc/rc.d/".

This script was called automatically when we reboot the server.
In this script i am using 'su' command to switch other user but it is not working, it giving some error.

su sas -c "pwd ; whoami"

Note:

After done the reboot, same command is working fine but it is not working when we rebooting the server.

Please help me to resolve this issue.
# 3  
Old 10-06-2008
I am using AIX
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Server health Checks pre & post Rebooting

Hi, Earlier we used to reboot servers based on adhoc request, never checked anything on it pre-reboot., But now i need to reboot regularly but most of the info is not available, I need to know want to make sure that server to be rebooted without any issues, so I want to do few prechecks which will... (5 Replies)
Discussion started by: nanz143
5 Replies

2. Solaris

Remote managemnt - looking at hardware issue (using ALOM ) Server rebooting

Hi we have A sun4v SPARC Enterprise T2000 It has started to go down frequently without producing any corefiles. There is nothing in the logs to induicate any issues. So I'm trying to remotely check this and get to see if there are any hardware issue. I heard about ALOm and I think this is... (4 Replies)
Discussion started by: mnassiri
4 Replies

3. Red Hat

Server rebooting unexpectedly

hi, I have been working on Solaris am very new to linux. My concern is as it goes....our server is getting rebooted automatically and I am not able to understand anything from the var log messages. Could anybody help me out in troubleshooting the issue. 2.6.18-128.el5 #1 x86_64 GNU/Linux is... (1 Reply)
Discussion started by: EmbedUX
1 Replies

4. Solaris

Server Rebooting frequently

Deall All, I have facing some problem. I have a Sun 4500 Server at the customer place. Now the server is not booting mean's once the server is coming up it is automatically rebooting. As this is the critical server for the customer that is use for production . Can this be solved by... (10 Replies)
Discussion started by: sudhansu
10 Replies

5. Solaris

How to auto start MySQL server on Opensolaris after rebooting the machine?

Hi, In Linux, I will do it by editing the /etc/rc.d/rc.local . However, I can't find a rc.local file in Opensolaris. So, how can I do it in Opensolaris? I am new to opensolaris, so please teach me step by step. Thanks in advance. (4 Replies)
Discussion started by: AlexCheung
4 Replies

6. Solaris

problem in rebooting solaris server

Hi, While we rebooting solaris server ,the system going to Maintenance mode instead of login console. even we are not able to run fsck command . Thanks in advanced for help. log attached FYI Executing last command: boot Boot device: /pci@83,4000/FJSV,ulsa@2,1/disk@0,0 File and args:... (3 Replies)
Discussion started by: helplineinc
3 Replies

7. Shell Programming and Scripting

How to call the ksh script when rebooting the server

Hi all, Can any one help me....... I just want to run one shell script whenever i am rebooting the server. Is there any easy way to do that???? Thanks, selva (7 Replies)
Discussion started by: Selva_Kumar
7 Replies

8. UNIX for Dummies Questions & Answers

Server rebooting frequently

O/P of the uname -a Server Server 4.0 3.0 3516 Pentium IV(TM)-ISA/PCI Server is getting rebooted frequetly... I don't know what is the problem in server ... Any help why the server is getting rebooted frequetly. Can i check what is the problem like in log files (5 Replies)
Discussion started by: srikanthus2002
5 Replies

9. UNIX for Advanced & Expert Users

Solaris 9 server hangs, when rebooting

Hi, We have a SunFire V880, hooked up with 2 T3 arrays. When ever we issue a reboot command on the system, it hangs at the same place right where it says syncing file systems done. To bring it back we shutdown power and it comes clean. By the way init 6 command works fine. Has anyone come... (3 Replies)
Discussion started by: smohd
3 Replies

10. UNIX for Advanced & Expert Users

Server name + IP address removed from host table after rebooting

Hi, I have a problem with a Unix server (SCO Unix version 3.2). If this server is rebooted the own server name and it's IP address is removed from the host table. How is this possible? How can i solve this problem? (3 Replies)
Discussion started by: FIRE
3 Replies
Login or Register to Ask a Question