News for hackers. Stuff that matters.
Re:Save your Linux machine – Recovering your root password a... by eitland on Friday May 01, 2020 @06:34AM (#23040746)
> It could also mean recovering the access to root,

No! Even for me as a non native speaker this is obvious since I have worked in the field for a few years.

A car is a vehicle but saying that "a vehicle means a car is wrong".

In the same way recovering access to the root account might give you the same effect as recovering the password, but often not.

This is a situation were correct wording isn't hard and a situation where it matters in my opinion. People come here to learn and we shouldn't mislead them especially when the cost of fixing it is trivial.

If I recover the access to root, fine, I have access to that machine.

If I recover the root password I have access to all that the root password gives me access to.

On systems where for example home or certain configuration files are encrypted using the password as a key (yes, a bit simplified), this is the difference between getting access to the data or not.

> this is just splitting hair anyway.

No. This is trying to avoid potentially costly misunderstandings.

Re:Save your Linux machine – Recovering your root password a... by tommica on Friday May 01, 2020 @07:28AM (#23041002)
Agreed, there is a big difference between recovering root password and recovering root access
Re:Save your Linux machine – Recovering your root password a... by laumars on Friday May 01, 2020 @07:27AM (#23040998)
> If I recover the access to root, fine, I have access to that machine.

> If I recover the root password I have access to all that the root password gives me access to.

In POSIX that's the same thing.

Re:Save your Linux machine – Recovering your root password a... by eitland on Friday May 01, 2020 @07:37AM (#23041061)
That might technically be true, but as far as I know, with my setup, if I reset my Linux password and use the new password to access my account, my data will be gone as the home folder encryption key was encrypted with my password or something to that effect.

Now I cannot say for sure that this is possible on the root account as well - I've hardly used the actual root account since Ubuntu taught me otherwise in 2006 - but I see no obvious reason why you shouldn't be able to encrypt roots home folder the same way we encrypt other home folders.

I'm interested in knowing though in case I'm missing something.

Re:Save your Linux machine – Recovering your root password a... by laumars on Friday May 01, 2020 @07:59AM (#23041165)
If you’re encrypting your whole disk (encrypting /root doesn’t give you any benefit) then you will need to enter your passphrase before your system gets as far as reading /etc/shadow.

So that guide basically assumes you either already know your decryption passphrase or you don’t have full disk encryption. In either case, changing roots password wouldn’t lock you out of the root file system

Re:Save your Linux machine – Recovering your root password a... by eitland on Friday May 01, 2020 @08:31AM (#23041329)
> If you’re encrypting your whole disk

Not what I am talking about.

I'm talking about encrypted home folders.

Re:Save your Linux machine – Recovering your root password a... by fl0wenol on Friday May 01, 2020 @10:54AM (#23042553)
I've never seen a system set up where root's home folder is encrypted. But also you wouldn't run the system as root normally, so there shouldn't be anything in the root folder to be lost even if that was the case. Getting access so you can fix what's not working is the primary reason for wanting root if you've somehow lost the password, or sudo broke, etc.
Re:Save your Linux machine – Recovering your root password a... by usr1106 on Friday May 01, 2020 @10:49AM (#23042507)
That's ecryptfs. It's no longer supported by newer versions of Ubuntu. The key is not your password. It's somehow protected by a pam module I believe to remember. I once noticed that being root allows you to su into their account, but not decrypting their home directory. So possibly the encryption key is encrypted using the password. One might need the old password to reencrypt the encryption key with the new password.

I had no interest to dig deeper, so I am not sure.

Re:Save your Linux machine – Recovering your root password a... by yjftsjthsd-h on Friday May 01, 2020 @11:03AM (#23042645)
ecryptfs is one way that encrypted home has been done, but it's also been done with encfs and ZFS (very recently).
Re:Save your Linux machine – Recovering your root password a... by laumars on Friday May 01, 2020 @11:08AM (#23042712)
And I already said there’s no point encrypting /root. “Root” isn’t a user you should be using day to day so the root home directory should be mostly empty.

Thus if an attacker has root access then it’s literally everything else apart from /root that you need to be worried about. Hence why I discuss disk encryption.