4

I have installed Submin. Manual says that I should recover my password at the first login. It should be ok, submin will send my new password by e-amil, but e-mail sending is disabled on server. How can I get a new password without e-mail sending in Submin?

1 Answer 1

4

Open your database with sqlite3.

sqlite3 /var/lib/submin/conf/submin.db

In the tool run these commands:

DELETE FROM password_reset WHERE userid = 1;
INSERT INTO password_reset(userid,expires,key) VALUES(1,strftime('%s','now')+(7*24*60*60),'verysecretfakekey');

Then, run this sql statement to verify username and email:

SELECT name,users FROM users WHERE id = 1;

The output will be in the following format:

username, email

Once done, close sqlite3 and open the following url:

http://example.com/submin/password/<username>/key

In the default case with these sql statements it should be

http://example.com/submin/password/admin/verysecretfakekey
9
  • I have tried this, but after I try to login: "Password is not encrypted with MD5, maybe password is not set. "
    – plaidshirt
    Commented Nov 24, 2014 at 21:01
  • Guess they changed the way passwords are generated, did some research and came up with a new method, updated my post.
    – user254948
    Commented Nov 25, 2014 at 11:38
  • After opening the db, second instruction gives an error: Error: unable to open database "/var/lib/submin/conf/submin.db": unable to open database file
    – plaidshirt
    Commented Nov 25, 2014 at 12:48
  • Hmm, I'm guessing your database is at another location or is in use? try finding submin.db on your disk (either check or use find / -type f -name submin.db) or perhaps its currently in use and you need to close programs using it (e.g. maybe webmin has it locked, try seeing if there are any webmin processes or shut down apache temporarely)
    – user254948
    Commented Nov 25, 2014 at 13:22
  • I can open the db file in mcedit. So there is in right place.
    – plaidshirt
    Commented Nov 25, 2014 at 15:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .