Can't run reset-user-password

scottorwig
Posts: 3
Joined: Sun Aug 12, 2012 4:55 am

Can't run reset-user-password

Postby scottorwig » Sun Aug 12, 2012 5:16 am

Amahi on Ubuntu has been working great for me. I've got terabytes of home video files stored in greyhole. Then I made the mistake of changing my password in the Amahi dashboard. Everything seemed fine until a reboot, when I found I was locked out. Neither the old nor the new password work.

The reset-user-password script would seem to be my answer but I can't get it to run. I've tried it as root and using sudo but I always get "command not found".

Code: Select all

root@homeserver:/var/hda/platform/html/script# ls about db-duplicate generate plugin console db-restore install-app reset-user-password db-backup destroy install-servers runner dbconsole first-admin performance server root@homeserver:/var/hda/platform/html/script# reset-user-password -u administrator reset-user-password: command not found root@homeserver:/var/hda/platform/html/script#
I'm very comfortable with MySQL so if there's something I can do directly in the database to reset the password I'll gladly do that instead.

Any suggestions?

scottorwig
Posts: 3
Joined: Sun Aug 12, 2012 4:55 am

Re: Can't run reset-user-password

Postby scottorwig » Sun Aug 12, 2012 5:48 am

Update:

I got it to run by omitting the -u switch. But I still can't log in to the web interface with a blank password nor either of the previous passwords. So I'm still locked out! The results of the script was:

Code: Select all

(... lots of stuff about deprecated commands ...) NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#initialize called from /var/lib/gems/1.8/gems/rails-2.3.4/lib/rails/vendor_gem_source_index.rb:100. Resetting password for administrator ... done. ********************************************************* IMPORTANT: THE PASSWORD IS NOT ASKED TO BE CHANGED *UNLESS* THERE ARE *NO* ADMIN USERS IN THE SYSTEM USE THE -u OPTION TO MAKE A USER NOT-ADMIN ********************************************************* root@homeserver:/#
By the way there are two users on the HDA, one called "administrator" and one called "family".

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Can't run reset-user-password

Postby bigfoot65 » Sun Aug 12, 2012 6:30 am

Hello,

We know about the warnings for this script. There has been a bug filed. Now, the script must be run with the -u option.

I did a test and ran it on my only user, then went to the dashboard and logged in with a blank password. I changed the password to what I wanted, rebooted, and was able to log in with the new password.

If administrator is your only admin user, run

Code: Select all

/var/hda/platform/html/scripts/reset-user-password -u administrator
Then when you log into the dashboard you should be able to change it. If not, try running it a second time.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

scottorwig
Posts: 3
Joined: Sun Aug 12, 2012 4:55 am

Re: Can't run reset-user-password

Postby scottorwig » Sun Aug 12, 2012 8:39 am

Thanks for your quick reply. With your help I was able to get the script to run successfully.

It turns out the script works when I run it with the full path, but not when I go to the directory itself and try to run it from there. So that's why I was able to get it to work the first time. It wasn't the omission of the -u switch but the fact that I ran it using the full path. Maybe there is a more general linux or Ubuntu reason for that and I just haven't learned it yet.

BTW, the path you posted didn't quite match my installation. I have a "script" directory rather than a "scripts" directory. But when I substituted "scripts" and used the -u as you said, it worked great.

So the full working command in my case (run as root) was:

Code: Select all

/var/hda/platform/html/script/reset-user-password -u administrator
Thanks again!

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Can't run reset-user-password

Postby bigfoot65 » Sun Aug 12, 2012 10:47 am

That was correct, sorry I inadvertently made it plural. To run a script from the actual directory, you have to specify the ./ in front of it.

For example:

Code: Select all

./reset-user-password
Glad you got it working.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 23 guests