Here, I need to install a driver on the server. When using sudo command, the following error is reported
XXX (user name) is not in the sudoers file. This incident will be reported.
it should be noted that my user is not a super administrator user, but a new ordinary user developed by the super administrator user, The reason why the above error is reported is that this user is an ordinary user and does not have operation permissions on the operating system. Here, the super administrator needs to add top-level permissions to ordinary users in the configuration file sudoers. The operations are as follows:
1. Switch to root, directly enter Su in terminator, and then prompt for the password. The password here is the login password of super administrator
2. The/etc/sudoers file is read-only by default for all users (including the root user), so you need to add write permission to the sudoers file. The command is: CHMOD U + W/etc/sudoers
3. Edit the sudoers file VI/etc/sudoers
the sudoers file is as follows
find this line root all = (all) all
, and add XXX all = (all) all
(XXX here is your user name)
PS: Here you can add any of the following four lines to sudoers
youuser ALL=(ALL) ALL
%youuser ALL=(ALL) ALL
youuser ALL=(ALL) NOPASSWD: ALL
%youuser ALL=(ALL) NOPASSWD: ALL
Line 1: allow user youuser to execute sudo command (password required).
line 2: allow users in user group youuser to execute sudo command (password required).
line 3: allow user youuser to execute sudo command without entering password.
line 4: allow users in user group youuser to execute sudo command, And do not enter the password when executing
4. Revoke sudoers file write permission. Command:
chmod u-w /etc/sudoers
Read More:
- How to Solve Rosep Problem in ROS Initialization (Sudo Rosep Init)
- Linux: How to Solve vim ~/.bashrc Execute Error
- [Solved] Linux error E: dpkg is broken, you must manually run ‘sudo dpkg –configure -a’ to resolve this issue
- Linux: How to Solve Rabbitmq Plug-in Install Error
- Linux: How to Solve pyperclip Module Error
- [Solved] Linux program error: dpkg is interrupted. You must manually run ‘sudo dpkg — configure – a’
- How to Solve Linux Error: -bash: unzip: command not found
- How to Solve No approve protocol error when running kettle on Linux
- How to Solve Android Linux5.10 Kernel do_gettimeofday Function Error
- How to Solve Linux error – rsyncd synchronous error 1
- How to Fix Ubuntu(Linux) mount error(22)
- [Solved] Invalid signature error for ROS repository while trying to do sudo apt-get update
- Grep: How to Find All the Files Containing a String in Linux
- How to Solve Error: “Hdaudio hdaudioc0d2: unable to bind codec”
- How to Create Threads in Linux
- How to Fix Linux sub process /usr/bin/dpkg returned an error code (1)
- Linux: How to Fix undefined reference to `itoa’
- How to Solve insufficent privileges error: Ora-01031
- linux(aarch64): How to Fix kettle Startup Error Issue
- How to Solve Roscore Run error [Install ROS]