solved Sudo..I'm confused

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025
my little ZG5 had 32 bit MX but after the last update threw a wobbly as it made the installation bigger than the 16gb zif drive, .go into fallback mode, install Debian 10 32 bit
great so far, its running quicker and cooler
Problem.. I wish to install a couple of apps that are not in buster repository this is the response [ I keep getting I know I am using the correct password [only set it up this PM.]
[
[email protected]:~$ sudo apt update
[sudo] password for brian:
Sorry, try again.
[sudo] password for brian:
brian is not in the sudoers file. This incident will be reported.

/QUOTE]
not had this problem before any thoughts?

Bwiz
 
Last edited:


f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,952
Reaction score
4,421
Credits
43,723
Can you share the output of.
Code:
id
 

arochester

Moderator
Staff member
Gold Supporter
Joined
Apr 25, 2017
Messages
1,729
Reaction score
1,398
Credits
3,741
Become Root. Type: su -
(note the hyphen)

Then do: apt install sudo
(It may say it is already installed}

Then do: usermod -a -G sudo brian

Reboot

(Some people say you can use: adduser
but I don't understand this.)
 
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025
Hi i will get it and boot it up a bit later its on charge at the moment
to give a bit of background this afternoon I did the edit grub change pasword [just in case I had sufferd a typo] which was accepted then the usual crlt+alt+del to confirm and re-boot
 
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025
thanks for coming to help, all thease years using sudo never had this happened before

@f33dm3bits
[email protected]:~$ id
uid=1000(brian) gid=1000(brian) groups=1000(brian),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev),115(bluetooth),121(lpadmin),124(scanner)

@arochester
[email protected]:~$ su -
Password:
su: Authentication failure
[email protected]:~$ apt install sudo
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,952
Reaction score
4,421
Credits
43,723
thanks for coming to help, all thease years using sudo never had this happened before

@f33dm3bits


@arochester
You aren't a member of the sudo group so you need to add your user to the sudo group as @arochester mentioned. You are getting an error when switching to the root user as well when entering the root password or you don't know the root password only the password of your normal user brian?
 
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025
I changed the password this afternoon via grub, I was getting the same message before I changed it
sounds like i have an install error.. the ZG5 is now back in the office on charge
 
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025
Morning boys, I learnt something this morning ..I cant jump from user to root, in the terminal, But i can enter root from the log in window
@f33dm3bits it is now working as root
@arochester tried to use your instructions [from root] ... usermod -a -G sudo brian result was command not found
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,952
Reaction score
4,421
Credits
43,723
What's the output of the following?
Code:
dpkg --list | grep passwd
 
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025
dpkg --list | grep passwd
[email protected]:~# dpkg --list | grep passwd
ii base-passwd 3.5.51 i386 Debian base system master password and group files
ii passwd 1:4.8.1-1 i386 change and administer password and group data
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,952
Reaction score
4,421
Credits
43,723
Strange the passwd package provides usermod. Can you share the output of the following?
Code:
which usermod
ls -l /usr/sbin/usermod
grep sudo /etc/group
 
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,952
Reaction score
4,421
Credits
43,723
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,952
Reaction score
4,421
Credits
43,723
As root can you try running the following and share the output?
Code:
/usr/sbin/usermod -aG sudo brian
id brian
 
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,952
Reaction score
4,421
Credits
43,723
[email protected]:~# /usr/sbin/usermod -aG sudo brian
[email protected]:~# id brian
uid=1000(brian) gid=1000(brian) groups=1000(brian),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),115(bluetooth),121(lpadmin),124(scanner)
That went as expected, your user brian is now a member of the sudo group, if you logout and back into your DE you should be able to run: sudo apt update && sudo apt upgrade.
 
OP
Brickwizard

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
4,029
Reaction score
2,718
Credits
30,025
That went as expected, your user brian is now a member of the sudo group,
faild...
[email protected]:~$ sudo /etc/apt/sources.list
[sudo] password for brian:
brian is not in the sudoers file. This incident will be reported.
 

arochester

Moderator
Staff member
Gold Supporter
Joined
Apr 25, 2017
Messages
1,729
Reaction score
1,398
Credits
3,741
What happens if you just use su to become Root?

Debian has two versions of su
There's su (no hyphen) which will take you into the user's account
and su - (with hyphen) which will take you into the System Root

Try su -
and
apt update && apt full-upgrade
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top