Kudos
Collect
Twiiter
Facebook
Share
Develop somethings, meditation, reading and thinking...

Add a user to Sudo group

Last updated over 4 years ago
0 0 0 0

After install a linux server, for security reason, you have to add a normal user to sudo group.

How to

## as root permission, adding ‘username’ to sudo group
root$ usermod -aG sudo username
root$ usermod -aG mysql username

## change shell for ‘username’,
root$ su - username
username$

## Let’s check
username$ sudo whoami
root 👈Succeed!🎉

Group List

root@venus:~# vi /etc/passwd
root@venus:~# vi /etc/group

https://linuxize.com/post/how-to-list-groups-in-linux/

Hi, my name is Richard. I’m a developer wants to make the world better with logic power. Mainly I use Linux, Nginx, MySQL, PHP and JavaScript . I want to share my knowledge with someone that it was also based from some great persons via LYNMP. 👨‍💻

Essedrop - Make your file online instantly
 

Responses

Leave a response to @richard

Please sign in to comment.
Markdown is also available in comment.