Koozali.org: home of the SME Server

Reset Admin password

Offline Ted

  • ***
  • 56
  • +0/-0
    • http://www.shadowsfall.org
Reset Admin password
« on: October 23, 2006, 03:38:02 AM »
Either my SME server has been hacked or it somehow lost it's admin password.  The directions I had for resetting the password under SME 6x don't seem to work.  Any directions for reseting the password?  I have physical access (it is in my garage after all).

Thanks

Ted

(no I did not forget the password.  It is not responding to it.)
...

Offline Ted

  • ***
  • 56
  • +0/-0
    • http://www.shadowsfall.org
Reset Admin password
« Reply #1 on: October 23, 2006, 04:29:29 AM »
Never mind.  I just finished a search on this site (something I should have done first before posting) and found out how.

I still wonder if I was hacked or if SME sever messed up somewhere and lost the orgional password.

::::::::::::::::From another post on this site:::::::::::

You can reset your root/admin password like this:

   1. Boot your server and use the arrow keys to select the kernel you would like to boot into.
   2. Press A , to append parameters to your grub boot settings.
   3. Be carefull not to change anything, only add the following:
      Code:
       single
      (Mind you there is a space before single).
   4. Press enter. you will be presented with a prompt.
   5. At this prompt type the following commands (followed by a return). You will be asked to provide a new password. Reset both your root and you admin password and set them to the same value:
      Code:
      passwd root
      Code:
      passwd admin
      .
   6. Reboot your server and everything should be okay now.

:::::::::::::

Thanks all

Ted

Molon Labe
...

Offline p-jones

  • *
  • 594
  • +0/-0
Reset Admin password
« Reply #2 on: December 23, 2006, 04:26:47 AM »
Using the passwd command from the command line menu is fine and it allows me to go into the server manager but when I try and update the admin password it wants the old pasword. This old password is the initial admin password which I have forgotten. Because of this, I cannot proceed. Anyone ?? Thanks
...

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Reset Admin password
« Reply #3 on: December 23, 2006, 07:26:44 AM »
Quote from: "p-jones"
Using the passwd command from the command line menu is fine and it allows me to go into the server manager but when I try and update the admin password it wants the old pasword. This old password is the initial admin password which I have forgotten. Because of this, I cannot proceed. Anyone ?? Thanks


Why not do the admin from the command line?
Code: [Select]
passwd admin
Code: [Select]
signal-event password-modify admin

Edit: Actually, there could be more to it.
Regards,
William

IF I give advise.. It's only if it was me....

Offline p-jones

  • *
  • 594
  • +0/-0
Reset Admin password
« Reply #4 on: December 23, 2006, 09:27:34 AM »
Thanks for the suggestion however there is more to it.

It appears changing the password at the command prompt changes it in the Centos system but not in the mysql. Setting it to a new password from the server manager then looks to the mysql database for the "old" admin password before updating. BUT- the purpose of doing this is because we have forgotten the old password !!
...

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Reset Admin password
« Reply #5 on: December 23, 2006, 11:33:30 AM »
Quote from: "p-jones"
Thanks for the suggestion however there is more to it.

It appears changing the password at the command prompt changes it in the Centos system but not in the mysql. Setting it to a new password from the server manager then looks to the mysql database for the "old" admin password before updating. BUT- the purpose of doing this is because we have forgotten the old password !!
You don't need to know the mysql password as this is a over 70 charachters long random generated string. To get root access to mysql simply enter mysql at the command line while accessing your server at the console itself or over a SSH connection.

If that does not work, than you probably have been tampering with your mysql root password which you should never do! The procedure to reset the mysql root user is in the bugtracker: bug 778

The procedure to reset your server admin and root password is described in this thread already.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline p-jones

  • *
  • 594
  • +0/-0
Reset Admin password
« Reply #6 on: December 23, 2006, 02:15:26 PM »
Thanks for the comments but I never made any reference to the mysql admin password, I was making references to the password belonging to the user "admin " as stored in the templating system / mysql tables.

NO, have not been tampering with the 70 chr mysql password.

Resetting the root password as per this thread is probably ok but I have not done it and dont need or intend to do it. It is only resetting the admin password that poses a problem and I would expect from my findings it would apply to any user which is shown in the server-manager user section.

I dont consider it a bug because using the kernel passwd command is bypassing the SME templating system. I suspect theremay be an SME type command line statement that can be used to do it properly  but I dont know what this is nor does searching the threads reveal itself.
...

Offline pfloor

  • *****
  • 889
  • +1/-0
Reset Admin password
« Reply #7 on: December 24, 2006, 06:48:45 AM »
"Thanks for the comments but I never made any reference to the mysql admin password, I was making references to the password belonging to the user "admin " as stored in the templating system / mysql tables."

There is no mysql admin user/password by default in SME7, only a mysql root user/password.

None of the system's users (including the admin user) or their passwords are stored in mysql.

Your admin and root passwords are/were the same (or should be).

Did you change the admin password from the command line but not the root?  I don't think the system will work properly if the admin and root passwords are different.
In life, you must either "Push, Pull or Get out of the way!"

Offline p-jones

  • *
  • 594
  • +0/-0
Reset Admin password
« Reply #8 on: December 24, 2006, 06:59:03 AM »
Thanks for the comments. I only changed the admin passwd (passwd admin) not the root. I was aprehensive about changing the root password in case I was locked out totally.
...

Offline pfloor

  • *****
  • 889
  • +1/-0
Reset Admin password
« Reply #9 on: December 24, 2006, 07:12:22 AM »
I just tested this and in the manager panel where it askes for the "Old system password" you must enter the current root password here.  If you have lost the root password then you will need to re-set it with the instructions above.

If you change the system password from the manager panel, it will change both the root and admin passwords and they will be the same.
In life, you must either "Push, Pull or Get out of the way!"

Offline p-jones

  • *
  • 594
  • +0/-0
Reset Admin password
« Reply #10 on: December 24, 2006, 07:28:35 AM »
Thats awesome Paul. I have just sorted my problem. Merry Xmas from downunder.
Peter
...

Offline lucho115

  • *****
  • 209
  • +0/-0
    • http://www.elac.com.ar
Reset Admin password
« Reply #11 on: March 27, 2007, 06:56:53 PM »
i have i similar problem, i install a contrib (Kronolith) but only the package no the smeserver-Kronolith (because i forgot) and then type:

"signal-event post-install"

then i remember that i need to use post-upgrade instead of post-install
so type:

"signal-event post-upgrade" and then
"signal-event reboot"

When the system was up again, i try to enter to the server-manager and said that "user or password was wrong", so i try enter by console with root user, and wrong password again.
So i look for a solution in the forum, and i found this topic, so log into console with a user that have sudo power and type:

"passwd root"
"signal-event password-modify root"

and

"passwd admin"
"signal-event password-modify admin"

thats solve the problem (or i think that), but when i try to access to the server via samba with the admin user, again the password error , so i type:

"smbpasswd admin"
"signal-event password-modify admin"

OK rigth know all is working but i have some questions:

My procedure was OK?
In ther next system update i loose this changes or no? if yes how to preserve the changes?
i use the webmail ok, but i look in the "users" table of horde mysql database and is empty, is OK?
and finally, i dont know how i loose my admin and root password, how is it possible?

Thks

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Reset Admin password
« Reply #12 on: March 27, 2007, 07:10:10 PM »
No it is not the procedure that should be taken although I cannot oversee if it will do you any harm. To be on the save side you can follow the correct procedure which is documented here in the FAQ section of the wiki.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline lucho115

  • *****
  • 209
  • +0/-0
    • http://www.elac.com.ar
Reset Admin password
« Reply #13 on: March 27, 2007, 08:48:19 PM »
Quote
No it is not the procedure that should be taken although I cannot oversee if it will do you any harm. To be on the save side you can follow the correct procedure which is documented here in the FAQ section of the wiki.


OK, i see the faq, but what the difference with my procedure?
I think that the method in faq (using grub to enter in init 1 or single to get root login without a password)is because if you loose the password so you cant enter to the system to do any change, but how i have an user with sudo power i do the same "passwd root" and "passwd admin". The thing that i dont understand is why smbpasswd was no changed when i type "signal-event password-modify admin", why??
and a ask again i will loose the changes or its OK?
tnks