Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

switchuser in the rc.net

Status
Not open for further replies.

olli2003

Technical User
Jan 31, 2003
93
DE
Hi gys,

I'll try to start a process, not with root,
out from the rc.net.
I know it's possible to execute a program which is in here,
but this only for the user root, isn't it?
How can I implement a switchuser or something in this way?
Thanks for your help!

Best Regards
Oliver
 
su - userid -c "command to execute"

IBM Certified -- AIX 4.3 Obfuscation
 
Hey Yegolev,

thanks a lot! I'll try later.

Best Regards
Oliver
 
Hi!

Sorry, but it's not working in that way.
Anybody another idea?
Thanks a lot,

Kind Regards
Oliver
 
Probably you have to set some env variables or specify the full pathname
 
Hi sbix,

thanks for reply!
What do you mean with this?
What kind of path? The path for the /etc is already set.
What kind of entries in my environment?

Regards
Oliver
 
Well, I don't know if the program you wish to launch is under /etc but it's better to specify su - user -c "/full_path/file_name"
Furthermore, if your program needs some lib it's better to launch a script with all the assigments inside like:
su - user -c "/path/script"
and in the script:

export PATH=blah_blah_blah
export LIBPATH=blah_blah_blah
export AL_THE_SETTINGS_YOU_NEED
/full_path/program_to_launch
 
Hello sbix,

thanks for help at first!
I've taken the full path but I think this user need some special libraries - perhaps.
I've take care of it.
Hope of success.

Regards
Oliver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top