Заметки сисадмина » How can I execute any command as a normal user without sudo?

Заметки сисадмина о интересных вещах из мира IT, инструкции и рецензии. Настраиваем Компьютеры/Сервера/1С/SIP-телефонию в Москве

How can I execute any command as a normal user without sudo?

2023-11-14 · Posted in Ubuntu

If your account has sudo rights, then there’s no need to mess with the suid bit. The following assumes Bash as your interactive shell, so you may have to modify steps 2&3 depending on what you use.

1)Add these to the end of /etc/sudoers

2)Add these to your ~/.bashrc

3)Reload the startup config for the current session.

4)Now you can run the commands as a normal user without being prompted for a root/sudo password (and therefore, eliminate the need to know the password altogether).

Leave a Reply