solved Sudo..I'm confused

brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
1,178
Reaction score
897
Credits
8,757
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
3,849
Reaction score
2,603
Credits
27,830
Can you share the output of.
Code:
id
 

arochester

Moderator
Staff member
Gold Supporter
Joined
Apr 25, 2017
Messages
1,547
Reaction score
1,218
Credits
2,535
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
1,178
Reaction score
897
Credits
8,757
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
1,178
Reaction score
897
Credits
8,757
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
3,849
Reaction score
2,603
Credits
27,830
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
1,178
Reaction score
897
Credits
8,757
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
1,178
Reaction score
897
Credits
8,757
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
3,849
Reaction score
2,603
Credits
27,830
What's the output of the following?
Code:
dpkg --list | grep passwd
 
OP
brickwizard

brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
1,178
Reaction score
897
Credits
8,757
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
3,849
Reaction score
2,603
Credits
27,830
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
1,178
Reaction score
897
Credits
8,757
OP
brickwizard

brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
1,178
Reaction score
897
Credits
8,757
OP
brickwizard

brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
1,178
Reaction score
897
Credits
8,757

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
3,849
Reaction score
2,603
Credits
27,830
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
1,178
Reaction score
897
Credits
8,757

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
3,849
Reaction score
2,603
Credits
27,830
[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
1,178
Reaction score
897
Credits
8,757
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,547
Reaction score
1,218
Credits
2,535
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
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online

Members online


Top