I'm somehow not in the sudoers file.

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
debianuser81
Posts: 12
Joined: 2023-03-06 22:35
Has thanked: 3 times

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

#21 Post by debianuser81 »

Thank you ok will try chromium. thank you. i will start new thread or search for tightvnc. 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.

#22 Post by sunrat »

I don't use any VNC so can't advise much, but package search shows:
https://packages.debian.org/search?keywords=tightvnc
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Easygoing1
Posts: 2
Joined: 2023-10-14 04:15

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

#23 Post by Easygoing1 »

Having just installed Debian 12.2 in a virtual machine, and having provided a password both to root and my user account during the setup of the operating system, I find myself unable to do even simple things like

Code: Select all

apt-get update
... and of course, I am not in the sudoers file ...

I have to protest to this decision that was made. Who would expect the default user account that was created during OS installation to NOT have sudo access to the OS? - ESPECIALLY if the root account is going to be locked by default? And who would not give a password to the root account AND their user account during operating system installation? Only someone careless would omit a root password unless this behavior was clearly spelled out during the installation phase of the operating system - which it was not even remotely mentioned.

It would be nice for a warning to come up during installation that says, "If you give a password to both the root account and the account that you create here, you will not have administrative access to this installation of Debian AT ALL, and you will need to re-install it and omit the root password" ... which omitting a root password is an asinine prospect in the first place, disabled account or not.

However, I can understand why such a warning is not given because it's absolutely ridiculous to have the OS lock out the initial user created during installation as well as the root account. Who does that? What is the point? Why is it not more proper to allow the admin the responsibility of securing their installation however they deem necessary instead of doing it for them and rendering them unable even to install any software?

This behavior needs to change. It is in the realm of the ridiculous. People can defend this all they want, but it's not the way an OS should behave - period!

Easygoing1
Posts: 2
Joined: 2023-10-14 04:15

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

#24 Post by Easygoing1 »

OK, so the correct response to this post is for the user to log in, open a terminal and type

Code: Select all

su
Hit enter.

Then type in the root password they assigned during installation.

This effectively logs you in as root at which point you can make any changes you need to make.

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.

#25 Post by sunrat »

@Easygoing1 In the full installer, the option to create a sudo password or root password is clearly explained. I don't know about the Calamares installer from the live system, never use it.

If you get root with "su" it will allow you to run root programs except for those in /usr/sbin/ as "su" retains the user environment. To run programs needing root environment such as those in /usr/sbin/ use

Code: Select all

su -
Note the dash. Alternatively sudo will allow you to run programs with root environment.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
eor2004
Posts: 254
Joined: 2013-10-01 22:49
Location: Puerto Rico
Has thanked: 10 times
Been thanked: 5 times

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

#26 Post by eor2004 »

@ OP: Hi, try this on this video, mabe it'll help you like it helped me , cheers!
https://youtu.be/WBgkuGQkwzk?si=4IOpAmo-7BiUNxBd
Debian 12 Gnome on MSI H61M-P25 (B3) PC
openSUSE Tumbleweed Plasma 5 on HP EliteBook 8540p
MX Linux on HP ProBook 655 G1 & Panasonic ToughBook CF-C1
Bodhi Linux 7 on HP Compaq DC5750 SFF PC
Windows 11 on Intel DH55TC PC
Linux user since 2007

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.

#27 Post by sunrat »

eor2004 wrote: 2023-10-14 18:57 @ OP: Hi, try this on this video, mabe it'll help you like it helped me , cheers!
https://youtu.be/WBgkuGQkwzk?si=4IOpAmo-7BiUNxBd
That video shows editing the sudoers file which is the hard way to do it. sudoers file already contains permissions for members of sudo group to run as sudo so all you need to do is add the user to sudo group:

Code: Select all

su -
adduser <username> sudo
of course, replace <username> with your actual username. You need to log out and back in to effect 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!

User avatar
eor2004
Posts: 254
Joined: 2013-10-01 22:49
Location: Puerto Rico
Has thanked: 10 times
Been thanked: 5 times

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

#28 Post by eor2004 »

sunrat wrote: 2023-10-15 00:19
eor2004 wrote: 2023-10-14 18:57 @ OP: Hi, try this on this video, mabe it'll help you like it helped me , cheers!
https://youtu.be/WBgkuGQkwzk?si=4IOpAmo-7BiUNxBd
That video shows editing the sudoers file which is the hard way to do it. sudoers file already contains permissions for members of sudo group to run as sudo so all you need to do is add the user to sudo group:

Code: Select all

su -
adduser <username> sudo
of course, replace <username> with your actual username. You need to log out and back in to effect it.
I was using debian 10, the hard disk that had Debian 10 died like four months ago, so I installed Debian 11 on the new one and had this issue of not being able to add myself to sudoers file or group, So, maybe that's why it didn't worked for me back then when I tried adding myself to sudoers group, I needed to use "su -" with the "-" hypen, because using "su" without the "-" hypen, didn't worked for me, but this has only happened to me so far on Debian 11, because in the past I was able to add myself to sudoers group using only "su" without the hypen since version 7, maybe something changed on this version of Debian 11 and I didn't RTFM or missed something on the release notes?
Debian 12 Gnome on MSI H61M-P25 (B3) PC
openSUSE Tumbleweed Plasma 5 on HP EliteBook 8540p
MX Linux on HP ProBook 655 G1 & Panasonic ToughBook CF-C1
Bodhi Linux 7 on HP Compaq DC5750 SFF PC
Windows 11 on Intel DH55TC PC
Linux user since 2007

User avatar
pbear
Posts: 509
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 2 times
Been thanked: 81 times

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

#29 Post by pbear »

sunrat wrote: 2023-10-14 04:48 I don't know about the Calamares installer from the live system, never use it.
For future reference, live-Calamares gives the primary user sudo privileges and does not enable the root account. The latter can be done easily post-installation, of course, with sudo passwd root.

Spherical7832
Posts: 2
Joined: 2024-09-10 22:02

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

#30 Post by Spherical7832 »

arochester wrote: 2022-07-21 16:49 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
To gain Root access use the following command and
give the password you used for root during setup:

Code: Select all

su -
arochester wrote: 2022-07-21 16:49 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)
No, you do have to reboot - logout/login does not cure the problem - but rebooting takes care of it.

Post Reply