Sudo question

Hi All

I want to grant elevated privs to a user that will be running a script as a background task. It will be launched from an ssh session via an embedded command in its key that just allows that account to run that script.

I'm reading up on sudo and notice that -

user  ALL=(ALL) ALL

Means that 'user' can execute from ALL terminals, acting as ALL (any) users, and run ALL (any) command.

I don't want anyone to be able to login as this user, (taken care of by the embedded cmd in the key so no terminal required) and I don't want this user to be able to su to anyone else either. I just want it to be able to execute any command.

I'm having trouble finding an example of a sudo line that meets this requirement.

Anyone know the syntax best suited for this?

Thanks in advance

Brad

format for /etc/sudoers file ...

who where = (as_whom) what

the sample below will allow jack to only run /dir/command only on host17 only as user jill ... see man sudoers for more info ...

jack host17 = (jill) /dir/command
2 Likes

Many thanks

Looks like the very thing I'm looking for :slight_smile: