LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-17-2021, 12:45 AM   #1
00x
LQ Newbie
 
Registered: Aug 2018
Distribution: OpenBSD
Posts: 20

Rep: Reputation: 0
how to add user to sudoers


How do I allow a user to use sudo?
This is what I have tried:
Code:
cia@TRRNTS:~$ su
Password:
root@TRRNTS:/home/cia# /usr/sbin/visudo
[...]
# Allow members of group sudo to execute any command
sudo    ALL=(ALL:ALL) ALL
[...]
root@TRRNTS:/home/cia# /usr/sbin/usermod -a -G sudo cia
root@TRRNTS:/home/cia# id cia
uid=1000(cia) gid=1000(cia) groups=1000(cia),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),112(bluetooth),115(scanner)
root@TRRNTS:/home/cia# exit
exit
cia@TRRNTS:~$ id
uid=1000(cia) gid=1000(cia) groups=1000(cia),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),112(bluetooth),115(scanner)
cia@TRRNTS:~$ sudo ls
[sudo] password for cia:
cia is not in the sudoers file.  This incident will be reported.
cia@TRRNTS:~$
 
Old 01-17-2021, 01:06 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Strange, in my /etc/sudoers it reads "%sudo", not just "sudo". Using only "sudo" would mean the user sudo I guess?

In any case, user & group changes don't take effect until you log out/in iirc.
 
Old 01-17-2021, 01:08 AM   #3
00x
LQ Newbie
 
Registered: Aug 2018
Distribution: OpenBSD
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ondoho View Post
Strange, in my /etc/sudoers it reads "%sudo", not just "sudo". Using only "sudo" would mean the user sudo I guess?

In any case, user & group changes don't take effect until you log out/in iirc.
that typo was the problem, thanks
 
Old 01-17-2021, 01:44 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by 00x View Post
that typo was the problem, thanks
Mark it SOLVED please - see my signature.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [sudoers]How-to edit '/etc/sudoers'? anon093 Linux - Security 3 01-02-2021 01:51 PM
Configure sudoers in CentOS 5.10 for a user to run a script owned by another user as that user ripelivejam Linux - Newbie 2 12-22-2015 02:02 PM
[SOLVED] User not in sudoers: How to add user? Permtion Denied for sudoers file esgol Linux - Newbie 3 07-13-2012 07:44 AM
Fedora /etc/sudoers file and sudoers.d directory davejjj Linux - Newbie 2 10-21-2011 06:19 PM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration