I'm somehow not in the sudoers file.

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
LAPIII
Posts: 47
Joined: 2015-07-07 19:26

I'm somehow not in the sudoers file.

#1 Post by LAPIII »

I just installed Debian 11 with XFCE and somehow not in the sudoers file. Have you an idea of what step I might have gotten wrong during installation?

I used debian-11.4.0-amd64-DVD-1.iso and not debian-11.4.0-arm64-netinst.iso which I'm installing now?

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 55 times

Re: I'm somehow not in the sudoers file.

#2 Post by arochester »

If you give a Root password and a User password the User is not on the sudo file.

If you give no Root password then a User password the user is in the sudo file.

To correct this and grant sudo access to the default user:

AS ROOT

apt-get update

apt-get install sudo

usermod -a -G sudo <username>

Now reboot the system.

(It's just enough to logout/login and not necessary to reboot the system)

LAPIII
Posts: 47
Joined: 2015-07-07 19:26

Re: I'm somehow not in the sudoers file.

#3 Post by LAPIII »

Everything worked until the last line of code. Did I do something wrong:

Code: Select all

root@debianvm:/home/luis# usermod -a -G sudo luis


LAPIII
Posts: 47
Joined: 2015-07-07 19:26

Re: I'm somehow not in the sudoers file.

#5 Post by LAPIII »

Yes, and I should have added that the last line of code rendered:

Code: Select all

bash: usermod: command not found
I rebooted anyway and ran:

Code: Select all

sudo vsudo
Which rendered:

Code: Select all

luis is not in the sudoers file.  This incident will be reported.
Then I reran that last line of code and got the same message.

LAPIII
Posts: 47
Joined: 2015-07-07 19:26

Re: I'm somehow not in the sudoers file.

#6 Post by LAPIII »

The reason I wasn't in the sudoers file to be because I chose the first option:

Debian_11_64-bit_[Running]_-_Oracle_VM_VirtualBox 21-07-2022 03⦂12⦂26⦂855 PM.png
Debian_11_64-bit_[Running]_-_Oracle_VM_VirtualBox 21-07-2022 03⦂12⦂26⦂855 PM.png (33.73 KiB) Viewed 86342 times

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 55 times

Re: I'm somehow not in the sudoers file.

#7 Post by arochester »

That shouldn't stop you being in the sudoer's file...

User avatar
sunrat
Site admin
Site admin
Posts: 7364
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 133 times
Been thanked: 649 times

Re: I'm somehow not in the sudoers file.

#8 Post by sunrat »

LAPIII wrote: 2022-07-21 17:57

Code: Select all

bash: usermod: command not found
Try

Code: Select all

# adduser luis sudo
Debian wiki is a great source of info and usually much faster than the forum:
https://wiki.debian.org/sudo/
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

hamishm
Posts: 28
Joined: 2022-07-06 10:28
Has thanked: 2 times
Been thanked: 1 time

Re: I'm somehow not in the sudoers file.

#9 Post by hamishm »

LAPIII wrote: 2022-07-21 17:57 Yes, and I should have added that the last line of code rendered:

Code: Select all

bash: usermod: command not found
Use 'su -' rather than 'su'. Otherwise your PATH is not set correctly.

User avatar
sunrat
Site admin
Site admin
Posts: 7364
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 133 times
Been thanked: 649 times

Re: I'm somehow not in the sudoers file.

#10 Post by sunrat »

hamishm wrote: 2022-07-22 02:09
LAPIII wrote: 2022-07-21 17:57 Yes, and I should have added that the last line of code rendered:

Code: Select all

bash: usermod: command not found
Use 'su -' rather than 'su'. Otherwise your PATH is not set correctly.
Ah yes, that would do it.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 133 times

Re: I'm somehow not in the sudoers file.

#11 Post by p.H »

LAPIII wrote: 2022-07-21 19:15 The reason I wasn't in the sudoers file to be because I chose the first option:
No. Partitioning has nothing to do with this. As previously explained, the reason is because you set a root password.

dick_freebird
Posts: 5
Joined: 2022-11-10 22:27
Has thanked: 1 time

Re: I'm somehow not in the sudoers file.

#12 Post by dick_freebird »

I created (or filled in the fields) for both a root login & PW, and a user login & PW using the Debian 11 net install.

After first boot, my root login does not work -and- the user account is not on the sudoers list, so I'm entirely hosed.

Why does the offered root login option, fail to behave as advertised?

How can this be fixed short of a full new hours-of-fun installation?

I do, yes I do, want a root account. There's some things that just do not work the same, sudoing from a user account (run across this in graphics driver install, it's a real thing, humor me).


User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5441
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 21 times
Been thanked: 88 times

Re: I'm somehow not in the sudoers file.

#14 Post by dilberts_left_nut »

****_freebird wrote: 2022-11-10 22:36 After first boot, my root login does not work -and- the user account is not on the sudoers list, so I'm entirely hosed.
Define "does not work".
How can this be fixed short of a full new hours-of-fun installation?
viewtopic.php?t=52993
AdrianTM wrote:There's no hacker in my grandma...

dick_freebird
Posts: 5
Joined: 2022-11-10 22:27
Has thanked: 1 time

Re: I'm somehow not in the sudoers file.

#15 Post by dick_freebird »

Thanks, arochester, for the quick pointer. Alas, I find that I cannot "su" as the instructions say, with result:

su: Authentication failure

I tried booting into the "recovery mode" kernel, and interesting complaint ends that effort:

"Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details"

Why the setup would create a locked account, without any indication, eludes me.

And I can't install sulogin without sudo or root access, it doesn't come with the base install....


The link from dilberts_left_nut worked out for me, in that I was able to get a shell prompt,
as root, and re-apply the root password; now the Debian login page accepts my root login.

peter_irich
Posts: 1413
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation
Been thanked: 12 times

Re: I'm somehow not in the sudoers file.

#16 Post by peter_irich »

To unblocking root, enter

Code: Select all

sudo passwd
You will be asked about password, it is root password. After that you will be can get root by command

Code: Select all

su -

debianuser81
Posts: 12
Joined: 2023-03-06 22:35
Has thanked: 3 times

Re: I'm somehow not in the sudoers file.

#17 Post by debianuser81 »

Ok I am following this thread because I am trying to load Debian 11 32 bit on an old laptop. I dont want to fill the landfills with old equipment so fixing this can donate to someone who needs it or I will add it to my collection to play.

I have installed almost all default settings no problem. I used to use UNIX AIX years ago but been out of it a long time so please help me. My root definitely works if I follow of your advice to do the
su -
Definitely it works.

Yet when I try to install google OR tightvnc I get the same issue password does not work.
I have added the user to sudoers with
su -
adduser z sudo

worked fine. Then I exit SU to back to user and try to install the google or tightvnc packages.
Being a windows user I made the mistake of adding user "z administrator" as I got used doing that in windows to put the user at the bottom of list.

Is that my problem. I need help I have been doing the old trusty MAN for a few hours cannot see what issue is.
PS Brings back memories doing cd and ls commands. I once deleted a hole installation with the rm - command for a test to restore a disastor recovery tape. The team with IBM I was working with was not impressed. I was young lol.

thanks

User avatar
sunrat
Site admin
Site admin
Posts: 7364
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 133 times
Been thanked: 649 times

Re: I'm somehow not in the sudoers file.

#18 Post by sunrat »

debianuser81 wrote: 2023-03-06 22:43Then I exit SU to back to user and try to install the google or tightvnc packages.
What command are you using to install these packages? And what errors are shown if it fails to work?

You can check if you actually added your user to the sudo group with the command

Code: Select all

$ groups
It will show all groups you are a member of.

Usually we prefer for users to start a new thread for issues rather than join an old one. Will let it slide this time.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

debianuser81
Posts: 12
Joined: 2023-03-06 22:35
Has thanked: 3 times

Re: I'm somehow not in the sudoers file.

#19 Post by debianuser81 »

Thank you

I am starting to love UNIX again but hate the type errors I can mistake. CAPS and small letters make a difference and I wish it was more idiot proof like windows. i know there will be lots of comments on that. Please i love all operating systems even AIX Unix and System 370 and CMS VMS. LOL.

From reading and reading I had to add the user to the SUDOERS file with adduser right?
It worked. Got past the installation password now it works to install.

But when I try to load in a possible 32 bit Google Chrome I get errors with ending
"Unable to correct problems, you have held broken packages."

Is there a debian 32 bit Google chrome package out there or if not that is why I am getting errors?

I am also trying to load in TIGHTVNC and cannot even find. I need a .DEB at the end of the installer is that correct?

Please help me thanks you newbie to Debian on Thinkpad R40. It cannot do windows anymore as you all know.

User avatar
sunrat
Site admin
Site admin
Posts: 7364
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 133 times
Been thanked: 649 times

Re: I'm somehow not in the sudoers file.

#20 Post by sunrat »

Google dropped 32 bit support for Chrome in 2016 so that's a no-go.
You can install Chromium which is the open-source build of Chrome, from the Debian repositories; it does have a 32 bit version. Install it with Synaptic or whatever package manager you are using. In CLI you can do simply

Code: Select all

sudo apt install chromium
Personally I much prefer Firefox as do most Debian users according to a recent poll. The Bullseye version is called firefox-esr in the package manager. It also has a 32 bit version.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply