linux user adds Sudo permissions post

2023-01-06   ES  

This article briefly introduces how to create a user in the Linux environment and give this user a SUDO permissions.

1 root Create test user test

[[email protected] ~]# useradd test

2 Switch Test user to check SUDO permissions

[[email protected] ~]# su - test
[[email protected] ~]$ sudo date

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

3 Switch ROOT users to add Test user Sudo permissions with Visudo

[[email protected] ~]# visudo

Open the/ETC/SUDOERS file through Visudo, add the downward and save

test    ALL=(ALL)       NOPASSWD: ALL

4 Switch TEST user to check Sudo permissions

[[email protected] ~]# su - test
[[email protected] ~]$ sudo date
Fri Oct 28 11:19:57 CST 2016

source

Random Posts

System Integrated Software Sensor Limited Management

TriggerField and Spinnerfield control instance

cocos2dx3.15 access WeChat SDK to realize and share Android Studio2.3.3

mysql query the last seven days MR

About Ubuntu Chinese garbled and terminals cannot open and circulate login problem CSDE