Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm a LinuxMint user, which by default lets the user with all privileges. I would like exclude any user from the sudoers file, and let only root with those privileges, like it happens in Debian. The problem is that I don't know how to do it properly.
I've already asked this in the LinuxMint forum, but had no answer. Could someone help me??
Below follows my sudoers file:
#
# 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.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
You'd have to use visudo, for best results...there is a page on this as well...oh, you'd like this thread on sudo as well...
And, yes, Mint does that...but, on the up side, the installation is a breeze and it's a pleasant OS to use. Just got it on my tablet and I lover it...no tough yet (the word being YET ) but...we'll get there...
At first, you have to activate the root account with
Code:
sudo passwd root
So that you can log in as root. Test that the login works before proceeding.
Now you can either comment out the rows starting with %admin and %sudo in the sudoers file (use visudo for that), simply with putting a # in front of the line, or you remove all users from the admin and sudo group.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.