LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Debian sudo (https://www.linuxquestions.org/questions/linux-newbie-8/debian-sudo-4175545102/)

Garrett85 06-11-2015 02:06 PM

Debian sudo
 
How do I set my main user account to have sudo privlages?

Head_on_a_Stick 06-11-2015 02:11 PM

Code:

# gpasswd -a <user name> sudo
# newgrp sudo

https://wiki.debian.org/sudo

EDIT: You will need to run these commands with root privileges.

Rather than log in as root, you can use:
Code:

su -c 'gpasswd -a <user name> sudo && newgrp sudo'

joec@home 06-11-2015 02:11 PM

Add the user to the sudo group:

sudo
https://wiki.debian.org/sudo

frankbell 06-11-2015 07:49 PM

You can add your user to sudoers as described above.

Debian does not set up sudo by default. Most distros, other than Ubuntu and its clones, do not share Ubuntu's sudo fetish.

Use su.

joec@home 06-12-2015 12:52 PM

Quote:

Originally Posted by frankbell (Post 5375861)
Debian does not set up sudo by default. Most distros, other than Ubuntu and its clones, do not share Ubuntu's sudo fetish.

The whole Ubunutu sudo thing I think is to focus on the European market compared to the American market. Not so well known in America, a lot of the European IT companies slap an admins hand for using the root user directly and prefer best practices to "sudo su" all the commands instead. Not saying I agree or disagree with it, just noting the different expectations of company policies of Europe verse America.

floppy_stuttgart 06-12-2015 01:21 PM

Or: open a "root windows" if you see one in the applications. You can open that windows from any user. Then you have to give the root password.. and you are in it.

Garrett85 06-17-2015 11:31 AM

Thanks all. If I plug my server up to the internet directly or through port forwarding I've read that I should have signing in under root via SSH turned off. If that's the case would making my primary username a sudo user be a security risk while making the SSH security measure irrelevant because now intuders wouldn't be able to log in under root but they would be able to log in directly under my username which would have the same privileges. Thanks again.

273 06-17-2015 12:11 PM

I love that question. If I wasn't on my phone I would likely type an essay contradicting itself. I would say it's better than having root exposed but, also, if you're going to be opening SSH to the internet then use public keys if you possibly can, for security, and change the port to a non-standard high port, for your sanity when you start looking at logs for hacking attempts.

jefro 06-17-2015 08:21 PM

I don't get that regional deal.

I'd think that one should limit access to root privileges. The use of sudo is a possible means to prevent various applications and services from starting unregulated.

Fred Caro 06-17-2015 08:47 PM

Garrett85,
why change it(privalages) now? Have you not already exchanged keys?

Fred.


All times are GMT -5. The time now is 10:42 AM.