Sponsored Content
Top Forums Shell Programming and Scripting Not able to 'su' to other user when rebooting the server Post 302243509 by vasanth.vadalur on Monday 6th of October 2008 02:05:25 AM
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
fastboot(8)						      System Manager's Manual						       fastboot(8)

NAME
fastboot - Reboots the system without checking file systems SYNOPSIS
/usr/sbin/fastboot [-lnq] DESCRIPTION
The fastboot command reboots the system without checking file systems. The program creates the fastboot file then invokes the reboot pro- gram. The system start-up script contains instructions to look for the fastboot file. If present, the script removes the file and skips the invocation of the fsck command. You must have root privileges to use this command. FLAGS
Does not log the reboot or place a shutdown record in the accounting file. Does not sync the disks or log the reboot. Performs a quick reboot without first shutting down running processes; does not log the reboot. FILES
Specifies the command path RELATED INFORMATION
Commands: fsck(8), rc0(8), rc2(8), rc3(8), reboot(8), shutdown(8), syslogd(8) Functions: sync(2), syslog(3) delim off fastboot(8)
All times are GMT -4. The time now is 11:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy