How do I run a startup script as a user other than root?
Running Slackware 10, I'm needing to run a startup script as a user other than root. Unfortunately I'm a n00b and I don't know how. Can anyone help me out here? Thanks. :)
|
What does your startup script do? Most of the major pieces of software have configuration files that start the main program as a non-priviledged user.
|
You might try running it from rc.local with the command "su <user> -c '<script to run>'. In general you need to run it while su'ed to the user you want it to run as.
|
Thanks, I used the su syntax in rc.local. I never dreamed of the -c, that's cool.
I'm starting samba. Unfortunately, despite everything appearing to start normally, samba is clearly not in the process list. /etc/rc.d/rc.samba, the /etc/samba (and all subdirectories and files), and /usr/sbin/smbd and /usr/sbin/nmbd are all have the correct permissions. Any ideas? |
I had the su command backwards. Thanks!
|
All times are GMT -5. The time now is 04:53 PM. |