[Client Mod][WIP] Password manager

[Client Mod][WIP] Password manager

Postby est31 » Wed Jan 28, 2015 6:43 am

A password manager mod, mostly targeted at people not afraid from the commandline and editing bare files. THIS IS A CLIENT MOD READ MORE BELOW

Installation
1. Get the 0.4.12 zip file, or the git master zip file if you run the latest minetest git.
2. Find a directory called "builtin". Its the directory the minetest executable resides.
2. Backup that directory to a safe place to not have to download minetest again if installation doesn't succeed, or your version isn't supported.
3. extract the zip file you downloaded, so that the directory "mainmenu" from the zip overlaps with the residing under "builtin", and the "pwmanager" directory is under "builtin". You will overwrite 2 files.
4. Write a password file called "password_list.txt". Save it into the "client" directory, which resides right next to your "worlds" and "mods" directories. Example see here.
How to use
Just set up your details in the password_list.txt, set the username, and log in with leaving the password entry blank.
Uninstallation
simply remove the "pwmanager" directory from the builtin directory. Note that this doesn't remove all traces, but as long as your version is supported, there are no functional changes. You remove all traces (except the "password_list.txt" by replacing the "builtin" directory with your backup.
Supported Minetest versions
Please run 0.4.12 for this client mod, or the latest git. Using with earlier versions will result in an error. Please be sure to make a backup of your "builtin" directory for fast uninstallation if the mod doesn't work.

Client mod
This isn't the usual server mod for minetest, its actually changing the client. Therefore this mod can't use usual deployment methods. Extracting it into the "mods" directory has no effect.

Other notes
License: LGPL v2.1+, source here.

Local server logins where the server runs in the same instance as the client aren't supported (yet).
The reason for making this as a mod and not a pull request is, that my hopes are low that this will get merged.

If there is a parsing error in the password_list.txt, the mod will note this, like other errors too, on the GUI and in the stdout.

Logins that should have a blank password don't work (yet), as the mod doesn't speak over the UI. You can set up those in the password_list.txt though, this should work.

The password_list.txt contains all your passwords in clear format and everybody that can open it can take your passwords.

If you have problems finding the right place for the password_list.txt, you can also change the location its stored by setting the "pwfile" value inside minetest.conf
Also, the default error message if the password file wasn't found will include something like "some_directory\mods\..\client\%POST_CONTENT%quot;. The two dots ".." indicate that the real path to store them is "some_directory\client\%POST_CONTENT%quot;.

You see, its still alot of WIP. I've posted this because I think it might be useful already now for some people, and I'm also happy to see any input on this.

Mod versions
0.1 first one
0.2 Show errors on GUI too
0.3 New password file format, please update. Also fixes error when logging in with a password without using the pwm.
est31
Developer
 
Posts: 173
Joined: Mon Dec 29, 2014 1:49 am

Re: [Client Mod][WIP] Password manager

Postby Xanthin » Wed Jan 28, 2015 3:33 pm

Hello est31,
having a bunch of longer passwords for a longer list of servers I was curious to test your mod :)

I had some problems with it before I successfuly joined a server with it.
I tested on winXP with minetest-0.4.11-1702c34-win32 (latest sfan5 build).

I followed your instruction, wrote the password list and got at my first try this:
Code: Select all
The password file wasn't at the position on D:\Spielerchen\minetest-0.4.11-1702c34-win32\mods\..\client\password_list.txt
or some other error occured while reading the file.


The mod path startled me (as well as the different name for "password_list.txt" without the plural, obviously a typo). The client directory for me is at
Code: Select all
...\minetest-0.4.11-1702c34-win32\client
(right next to world, mods, etc. like you wrote).

I changed in the pwmanager init.lua the modpath line into this:
Code: Select all
pwfilename = core.get_modpath() .. DIR_DELIM .. "client" .. DIR_DELIM .."password_list.txt"

created a client folder in mods and stored the password_list.txt there.
Maybe I made something other wrong at the beginning (I don't really have a clue about all this tech stuff, I am just trying and guessing), for example I knew where to store the mainmenu directory but didn't really knew where to put the pwmanager directory from the zip file (I just put it also into builtin). But now it found the password list without a warning. :)

But, haha, there is a limitation, it doesn't work with Umlauts like ä,ö,ü. After changing my password at the server, it now works like expected: Name in the name field, select server, start, play.
Now I have to figure out how I can add the other different servers with their own different password for the same user to the list. I wish the mod would simply do this for me. :D

When the list is complete it will be useful for me. No "wrong password" message because I typed wrong with tired eyes and fingers and, because there is no second check for the password creation at the first join to a server, I will not exclude my account from the server because I made a typo in the password. Nice.
Xanthin
Member
 
Posts: 127
Joined: Fri Mar 07, 2014 2:05 pm
GitHub: Xanthin
In-game: Xanthin

Re: [Client Mod][WIP] Password manager

Postby rubenwardy » Wed Jan 28, 2015 4:42 pm

The ../ wasn't a mistake. It means go back a level. foo/bar/../ is the same as foo/
It is used because you can't just get the root Minetest directory, you have to get the mods directory and go back up.

You don't need to modify mods/. The error message is probably because it hasn't been created yet.

Also, as a note to everyone, the passwords are stored in plaintext in a file. (From what I've read) You could just read the file. Ideally you'd salt the passwords before you stored them.
rubenwardy
Moderator
 
Posts: 5725
Joined: Tue Jun 12, 2012 6:11 pm
GitHub: rubenwardy
In-game: rubenwardy

Re: [Client Mod][WIP] Password manager

Postby Krock » Wed Jan 28, 2015 6:47 pm

I would prefer hashed passwords as replacement of the raw text.
Krock
Developer
 
Posts: 4227
Joined: Thu Oct 03, 2013 7:48 am
GitHub: SmallJoker

Re: [Client Mod][WIP] Password manager

Postby est31 » Wed Jan 28, 2015 8:37 pm

Xanthin: Yes, sorry the additional s was a typo.
Now I have to figure out how I can add the other different servers with their own different password for the same user to the list.

You can add different servers. The example I linked above (and updated now) includes the following logins:

Username "user1" on address "digitalaudioconcepts.com" port 30001 password "12345secretpassword" (ID 33)
Username "user1" on address "0.0.0.0" port 30000 password "42world" (ID 42)
Username "user1" on address "m.ayntest.net" port 30000 password "anothersupersecretpassword" (ID 34)
Username "user1" on server "VanessaE's Survival Server" password "12345secretpassword" (ID 33)
Username "usertester" on address "0.0.0.0" port 30000 password "42world" (ID 42)

Krock: I agree it would be better to have hashes, but I want a pure lua solution, and that only has access to un-hashed passwords.
Rubenwardy: Good to point that out, I'll add that (passwords stored in plain text) to notes. Unfortunately they cannot be stored salted. Also, salting is more a thing to do Server side than by the client.
est31
Developer
 
Posts: 173
Joined: Mon Dec 29, 2014 1:49 am

Re: [Client Mod][WIP] Password manager

Postby rubenwardy » Wed Jan 28, 2015 8:58 pm

Not in Minetest. They're done client side, to stop a malicious server from getting the plaintext. I know you currently can't specify a hash, only a plaintext password. That's why I said ideally.
rubenwardy
Moderator
 
Posts: 5725
Joined: Tue Jun 12, 2012 6:11 pm
GitHub: rubenwardy
In-game: rubenwardy

Re: [Client Mod][WIP] Password manager

Postby cHyper » Wed Jan 28, 2015 9:01 pm

how do I set details in the password_list.txt?

when I input username and password and enable connect nothing happens to me, nothing output of error-message.
cHyper
Member
 
Posts: 803
Joined: Fri May 06, 2011 8:49 am
GitHub: cHyper-0815OL
In-game: cHyper

Re: [Client Mod][WIP] Password manager

Postby est31 » Wed Jan 28, 2015 10:12 pm

cHyper: you can inspect the example I've linked to, everything you need is in there, the file should be self-explaining. The error message is output to the console, and to debug.txt. Its WIP, GUI errors will be added later on.
est31
Developer
 
Posts: 173
Joined: Mon Dec 29, 2014 1:49 am

Re: [Client Mod][WIP] Password manager

Postby est31 » Thu Jan 29, 2015 12:06 am

Errors now shown in GUI, too.
est31
Developer
 
Posts: 173
Joined: Mon Dec 29, 2014 1:49 am

Re: [Client Mod][WIP] Password manager

Postby cHyper » Thu Jan 29, 2015 12:11 pm

est31 wrote:Xanthin: Yes, sorry the additional s was a typo.
Now I have to figure out how I can add the other different servers with their own different password for the same user to the list.

You can add different servers. The example I linked above (and updated now) includes the following logins:

Username "user1" on address "digitalaudioconcepts.com" port 30001 password "12345secretpassword" (ID 33)
Username "user1" on address "0.0.0.0" port 30000 password "42world" (ID 42)
Username "user1" on address "m.ayntest.net" port 30000 password "anothersupersecretpassword" (ID 34)
Username "user1" on server "VanessaE's Survival Server" password "12345secretpassword" (ID 33)
Username "usertester" on address "0.0.0.0" port 30000 password "42world" (ID 42)


what is the exactly Format of a server-entry to be stored in the txt-file?

error-msg is much better now, thank you.
cHyper
Member
 
Posts: 803
Joined: Fri May 06, 2011 8:49 am
GitHub: cHyper-0815OL
In-game: cHyper

Re: [Client Mod][WIP] Password manager

Postby est31 » Thu Jan 29, 2015 3:27 pm

cHyper: See this (EDIT: outdated, use this one instead) example. There are different "fields", one "password", where you enter the passwords, and give every password a unique ID. The second main field is "lu", where every username has one entry. Every username has two fields addr_lu and select_srv_lu. You can enter a server in one or both of the fields, but I'd suggest to use addr_lu for security. select_srv_lu should only be used for servers where the ip address changes often. addr_lu contains the ip (or hostname) and port of the servers, and maps to one password ID each, while select_srv_lu contains the "name" of the servers. With name I mean that appearing in the public server list.

I see, the format is very complicated, and I also think that IDs aren't very useful. I think I'll make a new format for that file.
est31
Developer
 
Posts: 173
Joined: Mon Dec 29, 2014 1:49 am

Re: [Client Mod][WIP] Password manager

Postby est31 » Fri Jan 30, 2015 6:20 pm

Version 0.3: New password_list.txt file format. If there is demand, I can make it automatically convert to new format.
est31
Developer
 
Posts: 173
Joined: Mon Dec 29, 2014 1:49 am

Re: [Client Mod][WIP] Password manager

Postby cHyper » Sat Jan 31, 2015 6:13 am

great job u made. +1
cHyper
Member
 
Posts: 803
Joined: Fri May 06, 2011 8:49 am
GitHub: cHyper-0815OL
In-game: cHyper

Re: [Client Mod][WIP] Password manager

Postby Xanthin » Mon Feb 02, 2015 1:50 pm

@rubenwardy Thanks for the response, I think I understood what you said. And today I found that my password list had, however it happend, a wrong ending (.txt.txt), so I ! made a mistake there. :D

@est31 I used the latest version today. The list is much easier now for me to understand (the structure and examples) and to fill out. And it works smooth like expected.Thank you :)
Xanthin
Member
 
Posts: 127
Joined: Fri Mar 07, 2014 2:05 pm
GitHub: Xanthin
In-game: Xanthin

Re: [Client Mod][WIP] Password manager

Postby niwla23 » Sun Mar 17, 2019 8:48 am

Code: Select all
2019-03-17 09:47:11: ERROR[Main]: GUIEngine: execution of menu script failed: Failed to load and run script from C:\Program Files\Minetest\minetest-5.0.0-win64\bin\..\builtin\init.lua:
2019-03-17 09:47:11: ERROR[Main]: ...st\minetest-5.0.0-win64\bin\..\builtin\mainmenu\init.lua:30: attempt to call field 'setting_get' (a nil value)
2019-03-17 09:47:11: ERROR[Main]: stack traceback:
2019-03-17 09:47:11: ERROR[Main]:    ...st\minetest-5.0.0-win64\bin\..\builtin\mainmenu\init.lua:30: in main chunk
2019-03-17 09:47:11: ERROR[Main]:    [C]: in function 'dofile'
2019-03-17 09:47:11: ERROR[Main]:    ...es\Minetest\minetest-5.0.0-win64\bin\..\builtin\init.lua:44: in main chunk
2019-03-17 09:47:11: ERROR[Main]: No future without main menu!


Im on 5.0.0 and get this
niwla23
Member
 
Posts: 92
Joined: Sat Nov 17, 2018 5:40 pm
In-game: Niwla

Re: [Client Mod][WIP] Password manager

Postby Festus1965 » Sun Mar 17, 2019 8:53 am

Festus1965
Member
 
Posts: 924
Joined: Sun Jan 03, 2016 11:58 am
GitHub: Minetest-One
In-game: Thomas Explorer

Re: [Client Mod][WIP] Password manager

Postby niwla23 » Sun Mar 17, 2019 9:18 am

I fixed the first problem.
Now I get this:

Code: Select all
2019-03-17 10:23:22: ERROR[Main]: GUIEngine: execution of menu script failed: Failed to load and run script from C:\Program Files\Minetest\minetest-5.0.0-win64\bin\..\builtin\init.lua:
2019-03-17 10:23:22: ERROR[Main]: cannot open C:\Program Files\Minetest\minetest-5.0.0-win64\bin\..\builtin\mainmenu\gamemgr.lua: No such file or directory
2019-03-17 10:23:22: ERROR[Main]: stack traceback:
2019-03-17 10:23:22: ERROR[Main]:    [C]: in function 'dofile'
2019-03-17 10:23:22: ERROR[Main]:    ...st\minetest-5.0.0-win64\bin\..\builtin\mainmenu\init.lua:53: in main chunk
2019-03-17 10:23:22: ERROR[Main]:    [C]: in function 'dofile'
2019-03-17 10:23:22: ERROR[Main]:    ...es\Minetest\minetest-5.0.0-win64\bin\..\builtin\init.lua:44: in main chunk
2019-03-17 10:23:22: ERROR[Main]: No future without main menu!
niwla23
Member
 
Posts: 92
Joined: Sat Nov 17, 2018 5:40 pm
In-game: Niwla

Re: [Client Mod][WIP] Password manager

Postby Festus1965 » Sun Mar 17, 2019 9:38 am

cannot open
C:\Program Files\Minetest\minetest-5.0.0-win64\bin\..\builtin\mainmenu\gamemgr.lua:
No such file or directory - is that file there where is is searching for ?
Festus1965
Member
 
Posts: 924
Joined: Sun Jan 03, 2016 11:58 am
GitHub: Minetest-One
In-game: Thomas Explorer

Re: [Client Mod][WIP] Password manager

Postby niwla23 » Sun Mar 17, 2019 10:21 am

No, it does not exists
niwla23
Member
 
Posts: 92
Joined: Sat Nov 17, 2018 5:40 pm
In-game: Niwla

Re: [Client Mod][WIP] Password manager

Postby Festus1965 » Sun Mar 17, 2019 10:27 am

gamemgr.lua
then need to search where it is gone lost, or it had to be missing, but call was forgotten to delete ...

That is wired,
* in source github.com/minetest/minetest/blob/master/builtin/mainmenu/init.lua the call of "gamemgr.lua" is not included, and the file logic not there also
but
* in source of FreeMiner (as I search internet for minetest gamemgr.lua) there this call is in the init.lua and the file available.

Did you mix something up ?
Otherwise try to -- that dofile call, and make a fast test ...
Festus1965
Member
 
Posts: 924
Joined: Sun Jan 03, 2016 11:58 am
GitHub: Minetest-One
In-game: Thomas Explorer

Re: [Client Mod][WIP] Password manager

Postby rubenwardy » Sun Mar 17, 2019 10:45 am

The file has been merged with modmgr.lua into pkgmgr.lua
rubenwardy
Moderator
 
Posts: 5725
Joined: Tue Jun 12, 2012 6:11 pm
GitHub: rubenwardy
In-game: rubenwardy

Re: [Client Mod][WIP] Password manager

Postby niwla23 » Sun Mar 17, 2019 11:10 am

puh, can someone make a new version of this?
niwla23
Member
 
Posts: 92
Joined: Sat Nov 17, 2018 5:40 pm
In-game: Niwla

Re: [Client Mod][WIP] Password manager

Postby Festus1965 » Sun Mar 17, 2019 11:36 am

the failure is not in the password manager ... that is a main part of MT itself ... the init.lua still seam to be 0.4.x, but the file you miss is gone, like it should ... so, repair the server itself ...
Festus1965
Member
 
Posts: 924
Joined: Sun Jan 03, 2016 11:58 am
GitHub: Minetest-One
In-game: Thomas Explorer



Return to Minetest-related projects



Who is online

Users browsing this forum: Bing Bot [Bot] and 0 guests