Hello,I'm a beginners on linux and this is my first post.I installed #!10a2 and did an upgrade. While processing it has been asked to me if I wanted to replace the existing sudoers file by the packet owner one. I said YES ...
I've checked the sudoers file, it passed the check, here's the setup:
# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
# See the man page for details on how to write a sudoers file.
Accidentally removed my gnome desktop and am stuck in tty1. Trying to reinstall the desktop and keep getting the error "user is not in the sudoers file". Having trouble adding my user, new to debian and am not sure how to correctly open/edit sudoers from tty1 (or really how to edit files from cmd line for that matter if someone could please lend some specifics)!
I made a user 'admin' and copied ec2-user's keys with proper permission.
After successful login, i tried to do sudo su for root access, it says 'admin is not in the sudoers file. This incident will be reported.'
However i can do sudo su with ec2-user account and can gain root access.
Everytime I want to be able to run something that requires me to be a sudoer too many times, I need to google for the formatting of /etc/sudoers to remind me again what exactly is the proper way to write it.
Now I see different writing styles in my sudoers file, which is the consequence of different google results over the months.
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
agupta ALL= /sbin/,/usr/sbin/,/bin/,/bin/cat /etc/sudoers
ADMINS ALL= !/usr/bin/su, !SHELLS
alice ALL =(%Children) /sbin/, /usr/sbin/, /bin/
alice is a member of the Children group; please find below are details for alice:-
[alice@localhost ~]$ id alice