You are not logged in.
Pages: 1
I want to start nxtvepg as a daemon under user nobody. su nobody -c "nxtvepg -daemon with all my options and shit" asks me for a password. How can I do what I want (preferably without sudo)?
thx for your help
Offline
Are you logged in as root when running it ?
If not, you will be prompted for the user's password. IIRC, only root should not be prompted when doing a "su anyuser -c some-command..."
Last edited by dschrute (2007-04-28 20:19:20)
Offline
Yeah, I'm root. Kindof sucks cuz I wanted to put that into my rc.local but when I do my bootprocess gets interrupted and I'm prompted to change the password..
edit: here.. wtf:
# su nobody -c "touch /tmp/test1.txt"
You are required to change your password immediately (root enforced)
Changing password for nobody
(current) UNIX password:
su: incorrect password
Last edited by hybrid (2007-04-29 01:26:09)
Offline
i don't know for sure and i can't test it now but
passwd nobody should do it..
Offline
Well but I don't want to change a password for nobody, I mean, I dunno where nobody might be used elsewhere by Arch and if I change the password I don't know what I might screw up by doing so..
Offline
Check your /etc/pam.d/su file...
You should have a line like the following that is uncommented :
auth sufficient pam_rootok.so
If it's commented out, or isn't there, root will be prompted for the user's password when su'ing.
But in testing this, I am prompted to change "nobody's" password. So it may be necessary to set it in order to run commands via su. You could also create a user identical to nobody, for just this specific purpose, if you can't find a work-around to setting the password.
You may also want to check the password ( 2nd) field in /etc/shadow for differences in user accounts. As root I am able to run su without being prompted for a password, for any user with "!" in the password field, but not with "*". You should confirm, but I think you would be safe by simply changing this from one to the other, and the account would still be restricted from direct logins.
Offline
Hmmm, thank you very much for all the ideas. The idea of editing /etc/shadow sounds the "least invasive" to me but still I'm not sure whether I should go with that or not. I guess the only reason why I'm not already doing it is, that I'm kind of scared of screwing something up, because I really need my computer this and next week.
So what would you do, if you wanted to start a program (eg nxtvepg :>) at systemboot? It's just that I don't really want this program to be run under my userlogin, nor under root..
Offline
Pages: 1