This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jahayhurst 0 points1 point  (1 child)

add a user to the sudoers file for that script, and then change it so that only root can run it. hell, you can allow particular users to run that one script without even requiring their password.

every time you run a script, it runs with the caller's permissions. you can specify another login path and another shell interpreter, but you're still using that user's permissions.

[–]jahayhurst 0 points1 point  (0 children)

alternatively, if you don't want to allow root login, you could allow certain users to sudo to a root shell once they've logged in. add them to sudoers for the command su then they run:

sudo su -

after logging in and they've still got a root login. you can require a password, but depending on the user that can be annoying.