Ever heard of passwd? If you're on as root just change the password, sheesh. You don't need to edit /etc/shadow.Quote:
Originally posted here by phishphreek80
If you have access to the system as root, but don't know the root password then you can edit the /etc/shadow file to remove the encrypted password. Then you can set the password to whatever you want. This method is also used to reset the root password using single user mode at boot.
IOW, I don't actually know myself, so I will defer to someone else who I think knows. :rolleyes:Quote:
Originally posted here by !mitationRust
You would like to read some of the major flaws? I'm afraid I broke my stick on this dead horse awhile ago, but I'll let catch educate you on some of the flaws. *nix vs. ?, thread is not the same unless it has catch involved.
At any rate, it's useless to debate your non-statements based on someone else's statements that may or may not be correct.
Props to you spurious, for being the first person I've seen recommend this here in a long time.Quote:
Originally posted here by spurious_inode For root, always use a shell that can set the environment variables as `read-only'. Most implementations of the Korn shell recognize 'typeset -xr VAR' to mean export the variable and set it to read-only.
Bash supports this as well, via the readonly built-in for existing exports/declarations:
It should be in root's /etc/.bash_profile, or perhaps the system-wide /etc/profile if you want to do it for everyone. You should then lock down the profile files obviously, however if someone gets root on your system, your efforts will only lengthen the time it will take them to break it. :)Code:root@Optimus:~# export PATH="$PATH:/home/chsh"
root@Optimus:~# readonly PATH
root@Optimus:~# export PATH="$PATH:."
-su: PATH: readonly variable
You can also optionally flag stuff as readonly when it's declared using the built-in declare.
