Linux xx is not in the sudoers file. This incident will be reported.
  1. Switch to root user
      The method is to directly enter: su on the command line, and then enter the password (that is, your login password, and the password is not visible by default).
  2. The /etc/sudoers file is read-only by default, also for root, so you need to add the write permission of the sudoers file first, the command is:
    That is to perform the operation: chmod u+w /etc/sudoers
  3. Edit the sudoers file
    That is to execute: vi /etc/sudoers
    Find this line root ALL=(ALL) ALL, add xxx ALL=(ALL) ALL below him (where xxx is your username)

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

The first line: Allow the user youuser to execute the sudo command (password required).
The second line: Allow users in the user group youuser to execute the sudo command (password required).
The third line: Allow the user youuser to execute the sudo command without entering a password when executing it.
The fourth line: Allow users in the user group youuser to execute the sudo command without entering a password when executing it.

  1. To revoke the write permission of sudoers file, command:
    chmod u-w /etc/sudoers

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇