On 09/08/15 20:06, Kent Fredric wrote:
On 9 August 2015 at 17:48, Ross Drummond <[email protected]> wrote:
This will prompt you to enter a password and the confirm it. You
should the be able to change you login to root by issuing the su (switch
user) command.
That will of course require roots password, not the users password.
If you want a "get a working environment that is the same as switching
to root", then "sudo -i" can be useful.
It also means you can make a whitelist of the users who can sudo to
root in sudoers, vs su which anyone can use as long as they know or
can guess roots password.
... and failing that, you can always boot from a boot CD / DVD / USB
drive (to become superuser without having to enter a password) and edit
the password out of /etc/shadow - read this man page for further detail
on the format of the password file:
man 5 passwd
Once you have removed the password, you can then easily set a new one.
This obviously also works for all and any systems where you have never
known the root password, except for systems where the HD partition
holding the system is encrypted and you don't have the password to
decrypt the partition. (A good reason not to encrypt your disk if your
password management practices are sloppy, and a good reason to encrypt
your disk if you need to take security seriously. Obviously you can have
the best of both by not encrypting your system partition, while
encrypting your home or user data partition.)
Kind regards,
Helmut.
_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users