|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Run script with different user at the startup ..
Run script with different user at the startup ..
I have created this user appuser And I have a script should to be up thru the startup by this user appuser I have defined the path of the script /user/appstart.sh in /etc/rc But at the startup starting will be by root , I’d like to keep the starting of that script to be by appuser not root . Pls advice in this.. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
normally in debian, i used to do like, Code:
su USER -c 'command &' Hope it helps. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
The script in /etc/rc should contain the line that the geek suggested and then your other script can be anywhere you like.
|
|
#4
|
|||
|
|||
|
Code:
su USER -c 'command &' Many thanks this command very helpful ... |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Guy's ,
that command is working fine but is there another way to do the same thing to run the command by root and to be executed by appuser user |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
I think you need: Code:
su -l appuser -c command su with -l (or -) means: Provide an environment similar to what the user would expect had the user logged in directly. |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Quote:
from Run level script execution Quote:
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need to run script at startup. | pinga123 | Shell Programming and Scripting | 3 | 02-08-2010 03:49 AM |
| run script at startup | pchangba1 | AIX | 1 | 11-06-2008 09:51 AM |
| Startup script | texaspanama | Shell Programming and Scripting | 2 | 06-29-2006 03:08 PM |
| ksh in rc3.d startup script | JayNick | Shell Programming and Scripting | 1 | 05-19-2006 11:28 AM |
| Startup script DSL | c19h28O2 | Shell Programming and Scripting | 0 | 04-11-2006 04:54 AM |
|
|