LinuxQuestions.org
Visit Jeremy's Blog.
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-21-2019, 01:49 PM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 7,877

Rep: Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597
adding user to sudo group is not taking.


lucily I have other distros installed to get wifi working.....

this is a fresh install of a live debian - cinnamon install, the only thing done to it after install was ubtaing drivers for wifi install the get my wifi working, next step get sudo working --


now adding a user to sudo group add is not taking/ holding

Code:
userx@debiansucks:~$ su
Password: 
root@debiansucks:/home/userx# ls /etc/sudoers.d
README
root@debiansucks:/home/userx# usermod -aG sudo userx
root@debiansucks:/home/userx# id userx
uid=1000(userx) gid=1000(userx) groups=1000(userx),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),108(netdev),114(bluetooth),116(lpadmin),117(scanner)
root@debiansucks:/home/userx# exit
exit
userx@debiansucks:~$ id
uid=1000(userx) gid=1000(userx) groups=1000(userx),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),114(bluetooth),116(lpadmin),117(scanner)


loged out ' loged in 



userx@debiansucks:~$ sudo apt update
[sudo] password for userx: 
userx is not in the sudoers file.  This incident will be reported.
userx@debiansucks:~$ id
uid=1000(userx) gid=1000(userx) groups=1000(userx),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),114(bluetooth),116(lpadmin),117(scanner)
 
 
userx@debiansucks:~$ sudo apt update
[sudo] password for userx: 
userx is not in the sudoers file.  This incident will be reported.
userx@debiansucks:~$ id
uid=1000(userx) gid=1000(userx) groups=1000(userx),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),114(bluetooth),116(lpadmin),117(scanner)

Code:
userx@debiansucks:~$ cat /etc/sudoers
cat: /etc/sudoers: Permission denied
userx@debiansucks:~$ su
Password: 
root@debiansucks:/home/userx# cat /etc/sudoers
#
# 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	mail_badpass
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

# Allow members of group sudo to execute any command
#%sudo	ALL=(ALL:ALL) ALL

%sudo	ALL=(ALL) NOPASSWD: ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

Last edited by BW-userx; 01-21-2019 at 01:51 PM.
 
Old 01-21-2019, 02:51 PM   #2
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 288

Rep: Reputation: 104Reputation: 104
Can you show us the contents of /etc/group
Is Sudo even a valid group on your system?
 
Old 01-21-2019, 03:12 PM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 7,877

Original Poster
Rep: Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597
wow -- go Debian.. hold on

Code:
root@debiansucks:/home/userx# cat /etc/group | grep sudo
sudo:x:27:userx
just to recap it is not working.
Code:
userx@debiansucks:~$ sudo blkid
[sudo] password for userx: 
userx is not in the sudoers file.  This incident will be reported.
Code:
userx@debiansucks:~$ id
uid=1000(userx) gid=1000(userx) groups=1000(userx),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),114(bluetooth),116(lpadmin),117(scanner)
userx@debiansucks:~$ groups
userx cdrom floppy audio dip video plugdev netdev bluetooth lpadmin scanner
 
Old 01-21-2019, 03:32 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 10,693
Blog Entries: 7

Rep: Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673
adding user to group sudo is not the same as being in the sudoers file.
 
Old 01-21-2019, 03:35 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 7,877

Original Poster
Rep: Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597
Quote:
Originally Posted by ondoho View Post
adding user to group sudo is not the same as being in the sudoers file.
what are you talking about, sudoers file add group ( which is already added upon install. so it better be set up properly)
Code:
%sudo ALL=(ALL:ALL) ALL
to give users sudo rights add users to sudo group. If this distro did not give the group sudo the proper rights to it, then it is not my fault.



debian how to

Code:
Add the user to the sudo group

By default on Debian systems, members of the group sudo are granted with sudo access. To add a user to the sudo group use the usermod command:

usermod -aG sudo username
https://linuxize.com/post/how-to-cre...ser-on-debian/

then it goes to say this
Code:
Switch to the newly created user:

su - username
whatever happened to
Code:
sudo some command
passwd
in sudo
here:::
https://wiki.debian.org/sudo

Code:
Add existing user from commandline

To add an existing user with id=foo to group=sudo:

    $ sudo adduser foo sudo
results

Code:
 userx@debiansucks:~$ su
Password: 
root@debiansucks:/home/userx# adduser userx sudo
The user `userx' is already a member of `sudo'.

Last edited by BW-userx; 01-21-2019 at 03:51 PM.
 
Old 01-22-2019, 12:25 AM   #6
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 288

Rep: Reputation: 104Reputation: 104
Quote:
Code:
%sudo ALL=(ALL:ALL) ALL
This should be
Code:
%sudo ALL=(ALL) ALL
 
Old 01-22-2019, 05:35 AM   #7
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly OpenBSD, but still have AntiX on a couple of machines.
Posts: 2,753

Rep: Reputation: Disabled
(Best to use visudo when altering the sudo file as it will check your syntax is correct when you save it.)
 
Old 01-22-2019, 07:16 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 7,877

Original Poster
Rep: Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597
hum, then that makes me wonder if the people that create these distos even know what they are doing,because that is added like that during install, now I am going to go look that up to verify it. Its getting so I cannot even trust the makers of distros????

2. this is not the only distro I have seen sudoers file like that. (maybe) I do a lot of different distros.

3. I do not like vi. They should destroy the code for that and get rid of it.

4. for whatever its reasons it is now working. the only thing I did was open xterm and used that terminal and sudo worked, then it started working in the gnome terminal too. It failed the first try, then after that it worked.

Last edited by BW-userx; 01-22-2019 at 07:22 AM.
 
Old 01-22-2019, 07:23 AM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 7,877

Original Poster
Rep: Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597
Quote:
Originally Posted by /dev/random View Post
This should be
Code:
%sudo ALL=(ALL) ALL
Quote:
What can only be described as Microsoft Windows
64-bit implementation of a
32-bit extension to a
16-bit graphical shell for a
8-bit operating system originally coded for a
4-bit microprocessor by a
2-bit company that can't stand
1-bit of competition.
snicker snicker... good one..
 
Old 01-22-2019, 07:45 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,061

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
You typically need to logout and login for group settings to take affect.
 
Old 01-22-2019, 08:03 AM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 7,877

Original Poster
Rep: Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597
Quote:
Originally Posted by michaelk View Post
You typically need to logout and login for group settings to take affect.
I think I made mention of that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Giving sudo access to a user by adding to a group lslack Linux - Server 4 11-04-2013 12:48 AM
User is a Part of a Group But Group Details Do Not Show the User devUnix Linux - Server 6 08-08-2013 08:02 AM
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 02:36 AM
Block bitmap for group 416 not in group (block 0) + group descriptors corrupted? quanta Linux - Server 1 12-08-2010 11:40 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 05:01 PM

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

All times are GMT -5. The time now is 03:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration