Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: EB on July 18, 2001, 08:58:59 PM
-
Hi,
I know this may be a stupid question, but does anyone know how to execute a program/file as a different user than you are logged in as. For example: I am logged in as root, but want to execute ( ./someprogram ) as user joe.
Thanks,
EB
-
Well you can "su joe" which effectively changes who you logged in as to joe. Run the program. 'exit' to go back to root. This only works as root without a password. If you are not root, then you need joe's password for "su joe" to work.
The other option is to use the permission to run the program as a "setuid" program. Do a google search on setuid.
ed
-
Assuming you're using e-smith 4.1.x ...
man sudo
Scott
-
Thanks,
sudo worked
EB