I want to create a managed account with root powers and the ability to su as root if need be to manage the box without needing root. What is the correct way to do it?
Does this work?
/usr/sbin/adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M admin
I want to create a managed account with root powers and the ability to su as root if need be to manage the box without needing root. What is the correct way to do it?
Does this work?
/usr/sbin/adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M admin
Following steps will do the needful:
/usr/sbin/adduser PowerUser
)Add following line in /etc/sudoers
file using visudo
PowerUser ALL=(ALL) ALL
Read answers of this question.
Does this work?
On the level of adding a user that has full control of the system, then yes this works. It is though a bad thing as now you have two accounts with the same UID and GID so for example you have no way of telling who did what - just don't do that.
A better way to do this is to create a normal user and give them access to raised privilege through sudo. You can configure quite fine grained access to the system by configuring the sudoers file with the visudo command.