docs/Login/Forgot-Password.md
a) Wekan Snap
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/snap/wekan/current/lib/x86_64-linux-gnu
export PATH="$PATH:/snap/wekan/current/bin"
mongo --port 27019
If you have disabled new user registration at Admin Panel, you can enable it, and create new user your https://wekan.example.com/sign-up :
db.settings.update({},{$set: {"disableRegistration":false}})
Find what users there are:
db.users.find()
Set some user as admin:
db.users.update({username:'admin-username-here'},{$set:{isAdmin:true}})
Check are there any failed logins with wrong password, that brute force login prevention has denied login:
db.AccountsLockout.Connections.find()
If there are, delete all those login preventions:
db.AccountsLockout.Connections.deleteMany({})
Then exit:
exit
Then login to Wekan and change any users passwords at Admin Panel / People / People.
b) Wekan Gantt GPL Snap
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/snap/wekan-gantt-gpl/current/lib/x86_64-linux-gnu
export PATH="$PATH:/snap/wekan-gantt-gpl/current/bin"
mongo --port 27019
If you have disabled new user registration at Admin Panel, you can enable it, and create new user your https://wekan.example.com/sign-up :
db.settings.update({},{$set: {"disableRegistration":false}})
Find what users there are:
db.users.find()
Set some user as admin:
db.users.updateOne({username:'admin-username-here'},{$set:{isAdmin:true}})
Check are there any failed logins with wrong password, that brute force login prevention has denied login:
db.AccountsLockout.Connections.find()
If there are, delete all those login preventions:
db.AccountsLockout.Connections.deleteMany({})
Then exit:
exit
Then login to Wekan and change any users passwords at Admin Panel / People / People.
c) Use DBGate or Nosqlbooster to edit wekan database users table to have admin true:
db.boards.updateMany(
{ members: { $elemMatch: { userId: “USER-ID-HERE”, isAdmin: false } } },
{
$set: { “members.$.isAdmin”: true },
}
);
docker exec -it wekan-db bash
/bin/mongosh
show dbs
use wekan
show collections
db.users.count()
db.settings.update({},{$set: {"disableRegistration":false}})
db.users.find()
db.users.update({username:'admin-username-here'},{$set:{isAdmin:true}})
db.AccountsLockout.Connections.find()
db.AccountsLockout.Connections.deleteMany({})
exit
Admin Panel / People / People.More info:
Download Robo 3T on your Linux or Mac computer. Or, using ssh shell to server, login to MongoDB database using mongo cli
Make SSH tunnel to your server, from your local port 9000 (or any other) to server MongoDB port 27019:
ssh -L 9000:localhost:27019 [email protected]
a) If you don't have self-registration disabled, register new account at /sign-up, and make yourself admin in MongoDB database:
use wekan
db.users.update({username:'admin-username-here'},{$set:{isAdmin:true}})
b) If someone else remembers their password, and his/her login works, copy their bcrypt hashed password to your password using Robo 3T.
c) Install Wekan elsewhere, create new user, copy bcrypt hashed password to your password.
d) Backup, New install, Create User, Copy Password, Restore:
sudo snap stop wekan.wekan
3a. Empty database by dropping wekan database in Mongo 3T
3b. Empty database in [mongo cli](mongo cli](Backup#mongodb-shell-on-wekan-snap):mongo --port 27019
Look what databases there are:
show dbs
Probably database is called wekan, so use it:
use wekan
Delete database:
db.dropDatabase()
sudo snap stop wekan.wekan
db.getCollection('users').find({username: "YOUR-USERNAME-HERE"})
db.getCollection('boards').find({members: {$elemMatch: { userId: "YOUR-USER-ID-HERE", isAdmin: false} } })
And set yourself as admin.