Page 2 of 2

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

Posted: 2023-03-12 06:51
by debianuser81
Thank you ok will try chromium. thank you. i will start new thread or search for tightvnc. thanks

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

Posted: 2023-03-12 07:39
by sunrat
I don't use any VNC so can't advise much, but package search shows:
https://packages.debian.org/search?keywords=tightvnc

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

Posted: 2023-10-14 04:31
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!

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

Posted: 2023-10-14 04:36
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.

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

Posted: 2023-10-14 04:48
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.

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

Posted: 2023-10-14 18:57
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

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

Posted: 2023-10-15 00:19
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.

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

Posted: 2023-10-15 01:35
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?

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

Posted: 2023-10-15 03:05
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.

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

Posted: 2024-10-17 20:14
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.