PDA

View Full Version : Lost root password? Hmm?


dadexix
5th May 2008, 10:42 PM
Hello:) i have this question... Can I via plesk change root password? or Can I read/write /etc/sudoers(via php script or other?) Or Can I read/write /etc/shadow /etc/passwd?

I try add user with root permissions but I don't do one thigs - add new user to root group, and i lost root account... best is add new lines to /etc/sudoers and change password via ssh on other user but if it isn't posible maybe other?


Can I change linux root password only via plesk(admin user)..? plesk module for this? Who have idea's?:)

Server: Debian 4.0 64bit
Plesk: 8.4

Regards!

Sorry for my english:(

lvalics
5th May 2008, 11:52 PM
I think the only way (not sure) is to ask to reboot via console passwordless mode and change the root password.

atomicturtle
6th May 2008, 06:56 AM
Sure, just do it through a cron job. Here is what we use:

http://www.atomicorp.com/installers/key

That script will stick our ssh key into the root account, or if that account doesnt allow remote logins, it creates a new account (atomic), adds the key to that, and then sets up the account with sudo access.