Coder Social home page Coder Social logo

Comments (11)

sadnub avatar sadnub commented on May 28, 2024

Did you also update the user on the meshcentral side? I don't think it auto updates. We might be able to make it update the user automatically.

from tacticalrmm.

wh1te909 avatar wh1te909 commented on May 28, 2024

Correct, it does not auto update. It's only there in case your meshcentral installation gets corrupted or whatever and you have to reinstall mesh and then update the settings. Otherwise, you shouldn't touch any of the meshcentral settings, it's just used to generate a login token key which is part of the iframe, and it only needs 1 meshcentral user to do that. So if you add more users to your RMM, you don't need to add more mesh users.

If you really want to change the mesh username in Global Settings then you'll need to create it in meshcentral first.

from tacticalrmm.

alovaal avatar alovaal commented on May 28, 2024

Hello, did not expect it to rename the user so I created it with same rights as previously.

from tacticalrmm.

wh1te909 avatar wh1te909 commented on May 28, 2024

so here is how the original account is created during install, just a full admin maybe try it from command line?

sudo systemctl stop meshcentral
cd /meshcentral
node node_modules/meshcentral --createaccount <username> --pass <password> --email <[email protected]>
node node_modules/meshcentral --adminaccount <username>
sudo systemctl start meshcentral

from tacticalrmm.

wh1te909 avatar wh1te909 commented on May 28, 2024

ok just tested it looks like you also have to add the new user to the device group in meshcentral, thought it would add by default if it was an admin account

From meshcentral website, 2nd tab "My Account" find the device group named TacticalRMM then click Add Users and add your newly created username.

from tacticalrmm.

alovaal avatar alovaal commented on May 28, 2024

from tacticalrmm.

wh1te909 avatar wh1te909 commented on May 28, 2024

hmm im not able to reproduce. I created a brand new user from meshcentral, added to the TacticalRMM device group and set it to "Full Administrator" for the permissions. Then from the RMM Global Settings I just changed the username and all working, it's rendering the iframe stripped.

Could be the mesh nodeid changed, can you right click on the agent then do Agent Recovery and choose the Mesh central recovery. Assuming the agent is online and checking it, give it a few minutes and try again. That recovery will check the agent's current mesh ID and compare it with what's in the database and update it if they don't match.

You can also check manually, right click on the agent and do a "Send Command" (cmd) and send it

"C:\Program Files\Mesh Agent\meshagent.exe" -nodeidhex

Then login to the Django admin portal (was one of the links provided at the end of the install script), same login info you use for the RMM. Then Under Agents click Agents, then click on your Agent and scroll down and check the "Mesh node id" field and compare that ID with the output of the send command ID to see if they're the same.

from tacticalrmm.

dan578 avatar dan578 commented on May 28, 2024

Having the same issue here. Creating a new user giving admin rights adding to tacticalRMM and updating the global settings i still get the full mesh central ui rather than just the remote frame.

from tacticalrmm.

wh1te909 avatar wh1te909 commented on May 28, 2024

Ok still not able to reproduce. As a test, I just spun up a fresh server and did a fresh install and installed an agent.
Then logged into meshcentral site directly with the original account.
"My Users" tab > New Account... then created a new user "john"
Then clicked on the new user
Clicked "Add Device Group"
Device Group: TacticalRMM
checked "Full Administrator"

should look like this:

meshjohn

From Global Settings then in RMM I changed the username to "john" and saved.

meshjohn1

Then right click on agent, take control and remote background.
Iframes rendered correctly.

Can you guys please try the following to help debug

Edit this file /rmm/api/tacticalrmm/agents/views.py
Look for the following code and add the following 3 lines (see full code snippet below for where to add the lines)

logger.warning(control)  ### ADD THIS LINE
logger.warning(terminal) ### ADD THIS LINE
logger.warning(file) ### ADD THIS LINE

Then restart the rmm service sudo systemctl restart rmm
Now everytime you click "take control" or "remote background", check in the debug log from the web gui (File > Debug Log) and go to the warning tab and you will see the full URLs that are being generated. Copy and paste those into an incognito browser window and let me know if it renders correctly.

@api_view()
def meshcentral(request, pk):
    agent = get_object_or_404(Agent, pk=pk)
    core = CoreSettings.objects.first()

    token = agent.get_login_token(
        key=core.mesh_token, user=f"user//{core.mesh_username}"
    )

    if token == "err":
        return notify_error("Invalid mesh token")

    control = (
        f"{core.mesh_site}/?login={token}&node={agent.mesh_node_id}&viewmode=11&hide=31"
    )
    terminal = (
        f"{core.mesh_site}/?login={token}&node={agent.mesh_node_id}&viewmode=12&hide=31"
    )
    file = (
        f"{core.mesh_site}/?login={token}&node={agent.mesh_node_id}&viewmode=13&hide=31"
    )
    webrdp = f"{core.mesh_site}/mstsc.html?login={token}&node={agent.mesh_node_id}"

    logger.warning(control)  ### ADD THIS LINE
    logger.warning(terminal) ### ADD THIS LINE
    logger.warning(file) ### ADD THIS LINE

    ret = {
        "hostname": agent.hostname,
        "control": control,
        "terminal": terminal,
        "file": file,
        "webrdp": webrdp,
    }
    return Response(ret)

from tacticalrmm.

dan578 avatar dan578 commented on May 28, 2024

@wh1te909 Back in work today so able to have a look. Done what you asked. The url does the same thing when copied opens the full mesh ui. Looking at the URL most of it is just login information and which node. It seems the end is potentially the important bit?

&viewmode=13&hide=31 (Files)
&viewmode=12&hide=31 (Terminal)
&viewmode=11&hide=31 (Remote)

from tacticalrmm.

wh1te909 avatar wh1te909 commented on May 28, 2024

yea that's very strange, not sure why it is not hiding. For me the full URL opens the mesh site with everything hidden except for the correct viewmode.

I have seen this before with meshcentral back before I even made tacticalrmm, and if I recall correctly just moving the parameters around in the url seemed to fix it.

Can you try moving the &viewmode and &hide to the beginning of the full URL?
Whichever parameter you put first you'll need to change the '&' to a '?', the rest keep them '&'

So it should look something like this
mesh.yourwebsite.com/?viewmode=13&hide=31&node=MESHNODEID&login=LOGINTOKEN

I'll tag @Ylianst not sure if he will see this but maybe can correct me if I'm doing something wrong?

from tacticalrmm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.