Toggle navigation
Koozali.org: home of the SME Server
Community
Forums
Bugs
Lists
Forum Help
Download
SME Server ISOs
Contribs
Documentation
Manual
Wiki
FAQ
HowTo
Donate
Search
Login
Register
Login
Register
×
Close
Login
Remember me
Koozali.org: home of the SME Server
Legacy Forums
General Discussion (Legacy)
Topic:
Execute a file as a different user
« previous
next »
+
Print
Pages: [
1
]
Go Down
Execute a file as a different user
3 Replies
753 Views
EB
Execute a file as a different user
«
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
Logged
Ed
Re: Execute a file as a different user
«
Reply #1 on:
July 18, 2001, 11:49:33 PM »
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
Logged
Scott Smith
Re: Execute a file as a different user
«
Reply #2 on:
July 18, 2001, 11:54:48 PM »
Assuming you're using e-smith 4.1.x ...
man sudo
Scott
Logged
EB
Re: Execute a file as a different user
«
Reply #3 on:
July 19, 2001, 02:07:47 AM »
Thanks,
sudo worked
EB
Logged
+
Print
Pages: [
1
]
Go Up
« previous
next »
Koozali.org: home of the SME Server
Legacy Forums
General Discussion (Legacy)
Topic:
Execute a file as a different user