Comments (15)
oh dear! a bug indeed!
it should timeout after 60 seconds! the fact it keeps running after 5 mins isnt good!
also intheory it should of caught the msg notify and then displayed it to tell u it didnt add the user because as it says email address already in use
i just tried it here and it appears the email address needs to be unique across all domains!
so user//bob email is [email protected]
[email protected] cant be used in user/bobsdomain/[email protected]!
will look into this tomorrow for you
from meshcentral.
ok ive fixed the issue with it not notifying you that Email address already in use
.
its a backend issue where it was displaying the error in the web ui but i totally forgot about meshctrl !?
but basically the error you are getting is because it wants email address unique.
and this issue #289 i fixed that but it checks emails across ALL DOMAINS,
rather than just the domain in question!
so fixing that now!
from meshcentral.
ok question? tagging onto #289.
we shouldnt allow duplicate emails per domain as expected.
but should we allow duplicate emails across ALL domains?
if we did allow then #289 would happen with password resets resetting the wrong domains!?
from meshcentral.
@desrochers ok ive merged the fix so it now returns the error for you 1747ff7
HOWEVER im not sure how to handle the duplicate email addresses?
should meshcentral be checking IF the email address is already in use PER domain OR should it check globally?
from meshcentral.
@desrochers ive just realised, if you have set usernameisemail: true
in your domain config,
meshcentral will change the user
to the email
field, so it doesnt matter what user
you send, it will use the email
ive also UNDO the commit to check for duplicate email addresses because its causing confusion/problems in my testing!
from meshcentral.
i think you can close this issue now, as the meshctrl.js
has been fixed by me removing the commits 414d9b9
so it would allow you to create the users!
from meshcentral.
Anything with an _
infront of it is ignore, and the sample-config.json is just a sample, all the raw default values are inside the schema.json file which can be loaded in visual studio code!
from meshcentral.
Okay, that makes sense. I assume this setting was also disabled for me, but my script uses the e-mail address in both fields, so it's mimicking the behavior of userNameIsEmail: true.
Thanks again for the help!
from meshcentral.
thats a weird one? do you get ANY output at all when you run the command?
does it just keep running? or does it just look like it closes straight away?
from meshcentral.
It keeps running. I just tried running it again. It's been going for 5 minutes now. There's no output. I will have to CTRL+C to exit, but it never adds the user.
I ended up adding in some of my own logging to meshctrl.js
This is what's being sent to the WebSocket:
{
"action": "adduser",
"username": "[email protected]",
"pass": "myuserpassword",
"responseid": "meshctrl",
"email": "[email protected]",
"realname": "My User"
}
I get back serverinfo, userinfo, and then a msg.
{
"action": "msg",
"type": "notify",
"id": 0.5763815495393891,
"value": "Email address already in use",
"title": "New Account",
"userid": "user/mydomain_125109e6/mydomain_admin",
"username": "mydomain_admin",
"tag": "ServerNotify"
}
If the serverinfo and userinfo are needed, I can reproduce them.
I'm not sure why it's complaining about the e-mail address already being in use.
from meshcentral.
Awesome, thanks for getting that taken care of. I'll keep an eye out to see how the duplicate e-mail address thing gets handled.
from meshcentral.
Sorry, I am unclear if that question is directed at me. However, it would make sense to me that the e-mail (and username) would be on a per-domain basis. I am not sure if that would present any security issues, as the issue #289 mentioned something about using an e-mail address for password resets. But, I would assume that Mesh Central would use to URL to know which domain to use.
The reason this came about was because I built a simple frontend for managing devices through the web. However, some administrators need to be able to manage several different domains. The frontend uses meshctrl.js to automatically create the account for them. And it uses their e-mail address from my database to create the account.
In my case, if it is absolutely necessary, I can create unique usernames and e-mail addresses on the fly when adding a new user to Mesh.
from meshcentral.
That's interesting. Looks like usernameisemail: true is a default setting. Was that a new setting that was added in the last year or so? That would explain why it suddenly started giving me problems.
I haven't been able to update my Mesh Central yet but I did look at your code change so I'll assume it's fixed. Thanks!
from meshcentral.
No? usernameisemail: false
is the default?
U got me questioning my insanity now!?
Will have to check config when I get home now!?
Can u share ur config.json at all? (Hide secrets)
from meshcentral.
I may be misinterpreting it but this is where I say it was set to true:
MeshCentral/sample-config.json
Line 21 in 414d9b9
{
"__comment__": "This is a sample configuration file, edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
"_settings": {
"MongoDb": "mongodb://127.0.0.1:27017/meshcentral",
"MongoDbCol": "meshcentral",
"Port": 443,
"AllowLoginToken": true,
"AllowFraming": true,
"WebRTC": false,
"ClickOnce": false
},
"settings": {
"mongodb": "mongodb://10.0.1.71:27017/meshcentral",
"mongodbcol": "meshcentral",
"allowFraming": true,
"allowLoginToken": true,
"manageCrossDomain": [
"user//myadmin",
"user//meshadmin"
],
"WsCompression": true,
"AllowHighQualityDesktop": true,
"cert": "ras.mydomain.com",
"production": true,
"wanonly": true,
"port": 443,
"redirPort": 80
},
"letsencrypt": {
"email": "[email protected]",
"names": "ras.mydomain.com",
"rsaKeySize": 3072,
"production": true,
"_skipChallengeVerification": false
},
"domains": {
"_": {
"title": "MyServer",
"title2": "Servername",
"userQuota": 1048576,
"meshQuota": 248576,
"newAccounts": false,
"footer": "<a href='https://twitter.com/mytwitter'>Twitter</a>"
},
"customer1": {
"_dns": "customer1.myserver.com",
"title": "Customer1",
"title2": "TestServer",
"newAccounts": false,
"_auth": "sspi",
"footer": "Test"
},
"_info": {
"_share": "C:\\ExtraWebSite"
},
"mytest": {
"title": "My Test",
"newAccounts": false
},
"domain1_d71d2aeb": {
"title": "Domain 1",
"newAccounts": false
},
"domain": {
"title": "My Domain",
"newAccounts": false
},
"domain2_972893d4": {
"title": "Domain 2",
"newAccounts": false
},
"domain3_e04a6288": {
"title": "Domain 3",
"newAccounts": false
},
"domain4_07f18058": {
"title": "Domain 4",
"newAccounts": false
},
"domain5_b6d0a7d5": {
"title": "Domain 5",
"newAccounts": false
},
"domain6_e8500b18": {
"title": "Domain 6",
"newAccounts": false
},
"domain7_baf1b70d": {
"title": "Domain 7",
"newAccounts": false
},
"domain8_9bb49410": {
"title": "Domain 8",
"newAccounts": false
},
"domain9_695bdaf1": {
"title": "Domain 9",
"newAccounts": false
},
"domain10_53bf3332": {
"title": "Domain 10",
"newAccounts": false
},
"domain11_125109e6": {
"title": "Domain 11",
"newAccounts": false
},
"domain12_cecc0053": {
"title": "Domain 12",
"newAccounts": false
}
},
"__domains": {
"__comment__": "Added to support this project https://github.com/ijustw0rkhere/mesh-materialui",
"": {
"hide": 5,
"nightMode": 1,
"minify": false
}
},
"_peers": {
"serverId": "server1",
"servers": {
"server1": {
"url": "wss://192.168.2.133:443/"
},
"server2": {
"url": "wss://192.168.1.106:443/"
}
}
},
"_smtp": {
"host": "10.0.1.91",
"port": 587,
"from": "[email protected]",
"tls": false
}
from meshcentral.
Related Issues (20)
- Customized macOS Agents? HOT 11
- Can't see desktop on multiple MacOS devices when "locked" HOT 1
- Unable to install meshagent MAC HOT 28
- display flash errors for external auths like saml or oidc on the login screen HOT 10
- Don't require user consent if no one is signed in, PC is in the Windows logon screen HOT 3
- Disable 7 Day Power State HOT 3
- Recording files disappear
- WMIC.exe deprecation - not installed by default in Windows 11 24H2 HOT 2
- Linux installer for immutable distros HOT 1
- Add Device to Multiple Device Groups HOT 2
- Thermal Alarm - Notification/Email
- MeshCentral ignores meshcentral-web folder HOT 5
- File uploads are slow, increasing chunk size can help HOT 3
- Sorting active rdp sessions upon connection HOT 10
- Docker - Build config.json from Environment Variables at runtime HOT 1
- Star is in my Devices List view in front of the Device Description HOT 9
- RAM leak to the MeshCentral server HOT 29
- Add MeshCentral Android App to F-Droid HOT 1
- Network adapters without IP addresses are not included in networking list HOT 8
- Event filter in 'My Events' does not work for new events
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meshcentral.