![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling expect scripts from other expect scripts | seva | Shell Programming and Scripting | 0 | 04-03-2008 10:45 AM |
| FTP Scripts | raghav1982 | Shell Programming and Scripting | 27 | 12-07-2007 02:38 AM |
| scripts please | rrdore | SUN Solaris | 2 | 12-07-2006 01:35 AM |
| use of ssh in scripts | esham | Shell Programming and Scripting | 7 | 11-16-2005 07:27 AM |
| Help with GDL to SQL scripts | ch4r1e5 | Shell Programming and Scripting | 0 | 10-31-2005 01:51 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
using su in scripts
i want to start some processes as user xxxx during system reboot...
when the system comes up, it is signed on as root...how do i change the login in a script I tried doing this: su - xxxx << EOF <password> EOF and, this does not work...suggestions? |
| Forum Sponsor | ||
|
|
|
|||
|
Since the script is started by root, you should not need the password.
Sybase database can be started as the sybase user account using the following: su - sybase -c "${SYBASE}/install/startserver -f ${SYBASE}/install/RUN_SBSA & nohup" Hopefully that will help you with what you are trying to start. (the portion posted came from a script written in sh on Solaris 2.6) |
|
|||
|
Personally, I would not add that to my script for testing - test the script on a test box that you can have root access to.
Attempting to add the password will just confuse what you are doing - you will not have a valid test that the script works the way it was intended since you will remove all the code before moving to production - and that will not have been tested! |
|||
| Google UNIX.COM |