Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
as you have probably worked out, its dangerous to change root login settings when you need root to change them back !!!
anyways.. i see 2 options, boot a recueCD and change the passwd file back...
either go there yourself, or get someone else who lives there to do it for you.
OR.......
how secure is the machine ?
you installed the system right ? with your knoledge of the system, maybe you could "hack" it.
find a privilage esculation exploit in your system, and exploit to to gain root access and change the paswd file back.
In the future, if you need to do such a thing, backup the origonal, and write a script that will run as root, and restore the system to its origonal state at midnight.
then you can change your settings, test the new settings, and if the worst happens and you lock yourself out, atleast you will be let back in at midnight..
and you test the new setitngs and they are working as expected, kill the scripts PID.
thank you for your prompt reply i just found a third way to get back in as root: "su --shell=/bin/bash -" from a user account.
immediately, i went back to fix the root line in /etc/passwd but then thought - this could be a security advantage - i wouldn't mind specifying the shell in su, but people who don't know this won't be able to get in as root, even if they knew the password.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.