• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Snapins with info from FOG

    Scheduled Pinned Locked Moved
    General
    2
    3
    831
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      ITSolutions Testers
      last edited by

      I have been doing some searching but am not sure how to query the fog database on a local computer to user in a snapin. I would like to have a snap in that will check the FOG database and set the primary user as an admin. I can do scripts and snapins just fine. But when it comes to PHP and sql queries I am a complete novice. So far I run the following command to add my techs to the local admin group.

      net localgroup administrators "Domain\Tech Dept" /add
      

      But I was wondering if someone could help me figure out how to query the database and get the Primary user field and use it to add a user to the local admin group? Any help would be greatly appreciated.

      Wayne WorkmanW 1 Reply Last reply Reply Quote 0
      • Wayne WorkmanW
        Wayne Workman @ITSolutions
        last edited by

        @ITSolutions In order to do any sort of remote query, you have to enable remote access to the DB. There’s a wiki article explaining how to do that here: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL

        I’d strongly advise you to create a brand new account on the fog server for this, and give that account read-only access to the DB.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

        I 1 Reply Last reply Reply Quote 0
        • I
          ITSolutions Testers @Wayne Workman
          last edited by

          @Wayne-Workman Thanks for that pointer, that will definitely help in getting started in this. I am learning how to do simple sql queries in PS and VBscript to try and accomplish this but none of them would work without this part.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          253

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project