• Home
  • Logos (λόγος)
  • Haaretz (הארץ)
    • Recipes
    • 魚
  • Kendo (剣道)
  • Development
  • Wiki
  • 韓承佑

Sojourning Dinosaur

Veritas omnia vincit 信使可覆

Adding sudoers

August 18, 2016 by mhan Leave a Comment

A file can be added for groups of users or specific users to /etc/sudoers.d/ directory. This line would make someone a sudoer with no password requirement.

jsmith ALL=(ALL) NOPASSWD:ALL

If you want the user to type a password.

jsmith ALL=(ALL:ALL) ALL

Updating sudoers file safely

  • Last checked on Ubuntu 16.04.01 LTS (xenial)

The command visudo checks the validity of the sudoers file before making the actual update to the file, and this is the recommended way of editing the file because one can potentially lose sudo privileges unintentionally.

$ sudo visudo

Instead editing /etc/sudoers file I usually create a file at /etc/sudoers.d/localusers so I edit that instead.

$ sudo visudo -f /etc/sudoers.d/localusers

Changing the default editor used for visudo

I’m a VIM user, but many of the distros default to nano for newcomers to Linux systems. You can use the following command to change the default editor that is loaded for visudo and for many other apps.

$ sudo update-alternatives --config editor

 

Posted in: Development, System administration Tagged: sysadmin

TEMPUS FUGIT

January 2021
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
31  
« Nov    

Recent Posts

  • 一以貫之
  • 濫觴
  • 갚아야 할 빚만 있는 삶
  • 아브라함과의 언약
  • Ταχύτητα

Recent Comments

    Archives

    • January 2021
    • November 2020
    • October 2020
    • September 2020
    • July 2020
    • June 2020
    • May 2020
    • March 2020
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • February 2019
    • January 2019
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • February 2017
    • January 2017
    • October 2016
    • September 2016
    • August 2016
    • July 2016

    Categories

    • AI
    • Current events
    • Development
    • Haaretz (הארץ)
    • Kendo (剣道)
    • Lexicons
    • Logos (λόγος)
    • Recipes
    • System administration
    • Uncategorized

    Copyright © 2016 ~ 2021 Michael Han