My experience with Linux is limited to the work I do in the Asterisk/FreePBX .conf files. I have a need to create a second account (for tracking purposes) that can ssh into the FreePBX server, and be able to sudo on the system to make changes as root. There is no concern about them having full privileges, but I need it to be a different account other than root.
If the account was mahbell, how would I create it and how would I get it in the right permissions set?
Thanks for any guidance here.
useradd -G wheel mahbell
creates the user mahbell and adds them to the wheel (sudo users) group.
Then mahbell can run commands with root privileges by using
sudo and can switch to a full root shell with
sudo su -
Anyway to add a current user to to the wheel (sudo users) group.
The simple answer is that you edit /etc/group or use the usermod command (see man page).
However wheel is an OS specific convention. The actual controlling file is /etc/sudoers, which can define a group like this, but it might not be wheel. On Debian, it is sudo. It can also define users directly.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.