Quantcast
Channel: How to su non-interactively? - Server Fault
Viewing all articles
Browse latest Browse all 3

Answer by John Mahowald for How to su non-interactively?

$
0
0

Several ways to become another user.

su only works without a password if you are already root. Trying to provide a password to it on the command line is a bad idea, it will expose the credential. Don't use su.

sudo is widely deployed and free. You can deploy policy, including password-less commands, in files or LDAP.

ssh otheruser@localhost is even more widely deployed. However, you do have to have a passphrase-less key or equivalent.

ksu is useful in a Kerberos environment. If you already have a ticket you can use that.

pbrun is a part of PowerBroker, a commercial privilege product that I'm not very familiar with.

dzdo is a part of Centrify DirectAuthorize, another commercial privilege product.

doas is OpenBSD's take on execute commands as another user. It seems to have a Linux port, which is fairly recent development.

pfexec uses role based access control on Solaris. However, you tagged this question Linux.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>