Koozali.org: home of the SME Server

Lost root and admin passwords!

Mahmood Al-Yousif

Lost root and admin passwords!
« on: July 30, 2001, 09:24:33 PM »
Okay, I did something pretty dumb this afternoon. Suddenly the DNS server on e-Smith or the httpd services went wacko and would respond to any intranet requests on the website, I didn't want to restart the server, so I thought I would

/sbin/esmith/signal-event post-upgrade

Thinking that this would restart the httpd/dns services nicely. That wasn't the case, now I cannot log into the server as it will not accept ANY username/password, will not accept the admin login with the correct password, nor the root account.

Basically, we are all locked out. I can certainly spend the best part of the day re-installing everything, but the data!!! We *need* the data!!

e-Smith is configured with 2 drives on RAID1.

Any help? please? pretty pretty please?

What can I do to get the data, and even better restore everything to status quo? (no I don't have a backup.. that's why I put two drives in there... and yeah, I know I know I know...)

Elissa

Re: Lost root and admin passwords!
« Reply #1 on: July 31, 2001, 12:17:34 AM »
Have you made a boot disk?

Also you can do an upgrade by re-installing e-smith and ttping in "upgrade" instead of the accept.  If you type in accept it will erase your data upgrade will not erase it.  You will ahve to re set up you passwords and users etc..

Hope this helps.

Elissa

Nathan

Re: Lost root and admin passwords!
« Reply #2 on: July 31, 2001, 12:31:21 AM »
You can reboot the server and when you get the boot logo hit "CTRL-X" this should boot you to the standard looking "lilo:" prompt.  From there type "linux single" to boot into single user mode.  When you are at the BASH prompt (looks like a # sign) type in "passwd" to access the passwd program.  From here you can change the root password (not the E-Smith admin password, but using root you can "passwd admin" to change that).

Hope this helps.

Not quite sure if this works in the current version but it beats the heck out of reinstalling.

NF

aniston

Re: Lost root and admin passwords!
« Reply #3 on: July 31, 2001, 12:57:36 AM »
there is alwalys the single user way of getting into the system, to do so here is a cut and paste from one of my old replies to another person who wanted to getinto the system without having the root password. Ofcourse I will assume that you have physical access to the system. via its own keyboard and monitor.

--------
the way to get into the e-smith single user is quite simple, it just follows the same pattern that redhat uses (being based on the redhat distro ;)

when your comp boots up and you see the graphic of e-smith, you have 5 seconds to hit "ctrl-x" and then type in "esmith single" and this should let you boot into single user for maintenance mode as root, very handy when you forget the root password too, as the typing "passwd" allows you to specify a new root password. (also very dangerous if you are not the real sysadmin). There is also a way to protect from unauthorized acces with a second LILO password.

Once inside in single user mode you can change the password of root by the "passwd" function but be carefull on a succesfull reboot not to add an ibay in your e-smith manager if you think it has gone as it might be actually on the system but the configuration may be corrupted. before doing so you can also run the fsck utility just to nmake sure but better still disconnect one disk before runningany damaging commands to the system (thats your hope for a second life!) another options ia as fiollows...

Once inside single user use "mc" and navigate to the directory and adjust your system . that way you can stop the unwanted from happening. also if needed leave out (physically disconnect the raid second disk)the second hard disk before doing this so atleast you have a second chance if something goes wrong !! (really hope not). By the way to be extra sure you can sve the config file on a floppy once in single user mode, and even throw in an extra disk and save your Ibays to it so atleast you have the data (if you save to a disk formatted in fat32 you can even read your stuff in windoze) of course you will have to mount the disk first ion fat32 (assuming its already formatted in fat32 mode)

or else the last and a bit "all around town" method incase you cannot get along with the first few options is to use a system already mounted in linux eg. mandrake 7 or 8 or rh 7.1 and physically connect and mount one of your raid drives to it then save whatever is needed (mainly ibays and the config files) or else just install mandrake or redhat standard versions on an additional drive and recover your data  (worst comes to worst you can even use one of your raid drives)

lastly there is this program in windows called ext2explorer and works quite well if you only need to read the ext2 disk and copy your stuff ilke imp files from the ibays. To find it but try http://freshmeat.net as the link i found in the history is http://freshmeat.net/projects/explore2fs or the ome page at http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm

do let us know how you manage to save your skin :)

regards,
aniston

Mahmood Al-Yousif

Re: Lost root and admin passwords!
« Reply #4 on: July 31, 2001, 12:19:46 PM »
Thank you very much for this Elissa, Nathan and Aniston.. sure to save me an awful lot of time reinstalling, but more importantly give me access to my data!

Best regards
Mahmood

Mahmood Al-Yousif

Re: Lost root and admin passwords!
« Reply #5 on: July 31, 2001, 10:04:27 PM »
Thanx again, the suggestions of going to miniroot (Ctrl-X) in single-user mode, reset the root and admin passwords worked first time and no loss of data nor configuration occured (thank God!).

Best regards
Mahmood

Peter Hollandare

Re: Lost root and admin passwords!
« Reply #6 on: August 01, 2001, 02:53:31 AM »
Mahmood,

Now you have learned that a backup isnt that important

Mahmood Al-Yousif

Re: Lost root and admin passwords!
« Reply #7 on: August 01, 2001, 07:06:55 PM »
Tell me about it! I just ordered a DDS3 24GB tape backup drive! The one I have installed on it now can't cope as it is ancient and handles only 2GB...

Still, did a backup to desktop yesterday but windoze refuses to finish the backup and stops at 3.99GB!

Graeme Robinson

Re: Lost root and admin passwords!
« Reply #8 on: August 05, 2001, 08:41:56 AM »
why not put the DDS3 in the ESSG?

Jochen Hoegerl

Re: Lost root and admin passwords!
« Reply #9 on: August 05, 2001, 12:03:39 PM »
Mahmood Al-Yousif wrote:
>
> Still, did a backup to desktop yesterday but windoze refuses
> to finish the backup and stops at 3.99GB!


Yep, FAT32 can't create single files bigger than 4GB, but I think NTFS can.

jochen