|
|
|
|
|
by staeff777
174 days ago
|
|
I really like this idea and just tried some steps for myself.
create user with homedir: sudo useradd -m agent
add myself to agent group: sudo usermod -a -G agent $USER Allow agent group to agent home dir: sudo chmod -R 770 /home/agent Start a new shell with the group (or login/logoff): newgrp agent
Now you should be able to change into the agent home. Allow your user to sudo as agent: echo "$USER ALL=(agent) NOPASSWD: ALL" |sudo tee -a /etc/sudoers.d/$USER-as-agent
now you can start your agent using sudo: sudo -u agent your_agent works nice. |
|