You are not logged in.

#1 2022-06-29 22:00

compis
Member
Registered: 2022-06-27
Posts: 27

Seperate password on root

When Installing q4os it has an option to create a separate root password from the original account setup password. When I created the separate root password and started running q4os it continued to use the account password for installing apps or sudo command.

Is there a fault with the create a separate root password on installation?

Offline

#2 2022-06-30 00:07

tlmiller76
Member
From: AZ, USA
Registered: 2016-11-29
Posts: 455

Re: Seperate password on root

If you want sudo to ask for roots password, run visudo and change

%sudo ALL=(ALL:ALL) ALL

to

%sudo ALL=(ALL:ALL) ALL    Defaults targetpw

It will now always ask for the target password instead of the user password.


Q4OS Trinity machine - Crelander E160.  Intel Celeron N5105, 16GB LPDDR4, 512GB m.2 SATA SSD, Intel UHD graphics, Intel 7265 Wifi 5 + BT 4.x, 16" 3072x1920 LCD.

Offline

#3 2022-06-30 03:28

compis
Member
Registered: 2022-06-27
Posts: 27

Re: Seperate password on root

That means it is an installation omission on the installation ?

Offline

#4 2022-06-30 04:51

tlmiller76
Member
From: AZ, USA
Registered: 2016-11-29
Posts: 455

Re: Seperate password on root

compis wrote:

That means it is an installation omission on the installation ?

No, sudo is configured in the default way that it is used.  The targetpw is an optional configuration that makes the systme more like using su -c instead of sudo, most people don't want that, so that's not the default.

Last edited by tlmiller76 (2022-06-30 04:51)


Q4OS Trinity machine - Crelander E160.  Intel Celeron N5105, 16GB LPDDR4, 512GB m.2 SATA SSD, Intel UHD graphics, Intel 7265 Wifi 5 + BT 4.x, 16" 3072x1920 LCD.

Offline

#5 2022-06-30 23:32

compis
Member
Registered: 2022-06-27
Posts: 27

Re: Seperate password on root

The installation gives the option but it does not work. When installing, it gives an option to create a user password and a root password separate. When I tried creating a separate root password it was not used. Isn't this a fault with the installation ?

Offline

#6 2022-07-01 02:23

tlmiller76
Member
From: AZ, USA
Registered: 2016-11-29
Posts: 455

Re: Seperate password on root

Worked fine on my install that I did on Tuesday to take the root password.  Which image did you install from?

So, what are you trying to accomplish?  Do you want sudo to ask for root password, or do you want to apply a root password?  Those are 2 massively different things.

Last edited by tlmiller76 (2022-07-01 02:50)


Q4OS Trinity machine - Crelander E160.  Intel Celeron N5105, 16GB LPDDR4, 512GB m.2 SATA SSD, Intel UHD graphics, Intel 7265 Wifi 5 + BT 4.x, 16" 3072x1920 LCD.

Offline

#7 2022-07-01 06:05

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,334

Re: Seperate password on root

compis wrote:

The installation gives the option but it does not work. When installing, it gives an option to create a user password and a root password separate. When I tried creating a separate root password it was not used. Isn't this a fault with the installation ?

If you enabled the root account, it will only be used when specifically requested.

sudo will still work with your user password.

Alternatively you can use su which will prompt for the root password.  You will then see the bash prompt change to root.

The only time I have found I needed to enable the root account is for installing mysql - for some reason it just won't install properly without. Mind you that was for use with local Wordpress developement tools so that's another story.

Offline

#8 2022-07-01 06:36

compis
Member
Registered: 2022-06-27
Posts: 27

Re: Seperate password on root

I understand. The root password is for direct root access not for installing apps or sudo apt-get install xxx commands.

Thanks

Offline

Board footer

Powered by FluxBB