Pages tagged with su

  • How to su as another user without requiring a password - You can use sudo with su to login as another user without requiring a password. Add the following to /etc/sudoers: from_user ALL=NOPASSWD: /bin/su - to_user This allows from_user to login as to_user by issuing this command: sudo su - to_user Be w...
  • Run command as another user - If the user has a shell: su [user] -c "[command]" If they don’t have a shell: su -s /bin/sh [user] -c "[command]"
Go to top

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top