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

Snapins with info from FOG

Scheduled Pinned Locked Moved General
3 Posts 2 Posters 1.0k Views
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 Jan 13, 2016, 3:21 PM

    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.

    W 1 Reply Last reply Jan 13, 2016, 3:23 PM Reply Quote 0
    • W
      Wayne Workman @ITSolutions
      last edited by Jan 13, 2016, 3:23 PM

      @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 Jan 13, 2016, 3:28 PM Reply Quote 0
      • I
        ITSolutions Testers @Wayne Workman
        last edited by Jan 13, 2016, 3:28 PM

        @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
        1 / 1
        • First post
          2/3
          Last post

        120

        Online

        12.4k

        Users

        17.4k

        Topics

        155.9k

        Posts
        Copyright © 2012-2025 FOG Project