New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH Credentials not being remembered if username=email #5833
Comments
I believe I have found a bug. When setting up the server for the first time, before creating any users, I set the “usernameisEmail”: true variable and created a user with an email address being the username But if i just create a username normally without first setting that variable, then credentials save as they should. The issue appears to be in the fact that an email is used as a username, perhaps a bug in the characters used |
Im just wondering if there are any fixes planned for this. Otherwise I'll have to switch all my users to a normal username, which might be a slight headache. |
@si458 perhaps you can point me to the relevant file to sift through and see if I can spot anything that would cause this behaviour. |
this is weird? because i can see it goes to add the ssh creds into the db, and says it saved, but never actually saves? |
ok seems to be a BUG with nedb, if i use mysql or sqlite, it works no problem |
ok BIG problem, nedb doesnt handle fullstops correctly, so this would require a huge change for nedb |
ok so another work around is to remove the line below from inside
so we need to look at working out HOW to replace fullstops with maybe something else? |
Will look at migrating to mongodb for now… |
Unfortunately MongoDB does not really work properly on my FreeBSD server. But I will try MariaDB. |
you could try sqlite... |
Confirmed working as expected using MariaDB. Migration was as easy as
If you fix the NeDB, please let us know, but I believe MariaDB will serve better anyway. |
Glad u got it sorted! |
Any plans to integrate another database as default? |
i did ask @Ylianst but at the moment we are leaving it as it is, |
Ok, looking into this now. |
@Ylianst the issue as explained above here #5833 (comment) |
Ha yes, I just replicated the issue on my test server. In NeDB, I have to escape the "." on many of the fields due to how it works. I basically need to escape this case also. Hold on. |
Just fixed it. Replace the file common.js with the latest one here, reset the server and it will work. Fixes both RDP and SSH credentials. |
yep can confirm all works here! its encoding the string as |
Hmmm. It doesn't seem to be working for me though. |
Did u replace the single file? And restart meshcentral? Ans switch bk to using nedb? |
Yes i did. Basically removed the line for MariaDB, did a --dbimport, changed the file, and started the server again. The file was in node_modules/meshcentral/common.js |
Hang on just a sec. The issue I'm having is that my MeshCental username is my email. The credentials for the ssh and rdp connection themselves don't matter. If my MeshCentral username is my email, then it doesn't work. Are we on the same page? |
@tschettervictor yes that's my setup, usernameisemail and it works OK here now, saving into nedb with the master common.js being replaced |
Ok thanks. But its still not working for me. Tried different connections but no go |
can you share ur config.json please? (hide secret info) |
|
It does show the credentials as saved on the device page, but it still asks for a login when clicking connect. |
And I can't clear the credentials either. |
The fix seems to allow saving credentials that have "." in them. But my issue is that when my MeshCentral username has periods in it or is an email, then I can't save credentials. When I log in as a user without periods in it, I can save them properly. @Ylianst |
It looks like this bug is back in version 1.1.22 I am using mariadb as my database this time, but its again not letting me save the SSH credentials. |
Meanwhile, back on version 1.1.21 everything works again. |
@tschettervictor This has been fixed recently in PR #6001 so you just need to wait for a new release or npm install from git repo or use docker master image |
Ok. I assumed it was part of 1.1.22 |
It was fixed but then something else broke in 1.1.22 #5994 |
In version 1.1.21 I’m now running into a bug that will not let me save the ssh credentials of local devices if my username is a email address. They are being reset on every connection.
anyone else?
The text was updated successfully, but these errors were encountered: