Linux Lite Forums

Software - Support => Installing Linux Lite => Topic started by: D_Blaze on June 26, 2019, 10:31:48 AM

Title: User and Sudo passwords
Post by: D_Blaze on June 26, 2019, 10:31:48 AM
When installing i was asked to create a username and password.
this same password also became the password for sudo
is there anyway to change the password for sudo so it is different to my username password? (i would prefer to keep the password for the username and have a different password for sudo)

Looking at the manual i'm thinking i could create a new 'sudo' user, give it sudo group access, then remove my user from sudo group access. This way i will have a new password for sudo that's diff from my user password. Is this the best way of accomplishing this?

Cheers
Daniel
Title: Re: User and Sudo passwords
Post by: bernard stafford on July 08, 2019, 10:31:08 PM
What I found out you are correct. Just don't delete the other account as you described.
You can create a separate account with sudo access but without a separate home folder 
then add this user to the same group as the normal user and set it to use the same home folder with
 
Code: [Select]
sudo usermod -d /path/to/new/homeOne account for normal usage and the other allowed to use sudo.  8)
 
There is a way to do this by overriding the PAM (Pluggable Authentication Module)
settings for the sudo service. Do this at great risk to your machine - don't just copy and paste .
test test test! - before logging it out of terminal.  :'(