12 Replies Latest reply on Aug 12, 2014 1:41 PM by EvanGoldstein

    How to Get Client DNS Name

    EvanGoldstein

      HI,

       

      Is there a way to get or check for a particular DNS name on a FM 11 client? I have been using Get (SystemIPAddress), but the IP address that I need to check for will need to change periodically, so changing my code to search for a DNS name would be preferred.

       

      Thanks,

      Evan

        • 1. Re: How to Get Client DNS Name
          wimdecorte

          what platform?  Somewhat easier on the Mac than on Windows but doable either way.

           

          On Windows you can use Send Event to output the "ipconfig" command to a text file and then import that one and parse out the name.

          • 2. Re: How to Get Client DNS Name
            EvanGoldstein

            I need to be able to do this on both platforms.

             

            Thanks

            • 3. Re: How to Get Client DNS Name
              wimdecorte

              On Mac I'm sure you can use the "Perform AppleScript" script step and find it that way

              • 4. Re: How to Get Client DNS Name
                Mike Duncan

                I don't think you'll be able to reliably do this. You could possibly do a reverse DNS lookup, but those are assigned by your ISP. I assume you have a dynamic dns record associated with the IP address, so you might be able to get the IP associated with the dynamic DNS and check against the system IP.

                • 5. Re: How to Get Client DNS Name
                  taylorsharpe

                  It seems like you are trying to verify the database is being hosted on a particular machine so as to limit the database not being used without your permission or something like that. 

                   

                  Why not just get the Persistent ID instead of IP?  If this is being hosted, you will need to do a Perform on Server to get the Server's Persistent ID. 

                  • 6. Re: How to Get Client DNS Name
                    EvanGoldstein

                    Hi

                     

                    Let me provide more details,since simply getting the DNS name does not seem to be very easy.

                     

                    We have either a mac or pc in various conference rooms, that are shared by many people for meetings. There is a generic login people use on these machines, which provides a basic desktop, with acess to the FM solution, but no email client. Managing multiple email acct's on these machines if very problematic. The users use their own individual login to access the FM solution from these machines. There is a need to send an email from FM, that is riggered based on their actions in the FM solution, while they are in the conf room or sometimes while they are at their desks. My IT dept restricts access to the SMTP server, based upon IP or DNS name. So I need to capture whether or not my script shoud send the email via SMTP, or the client. Up until the script basiclaly says if the IP address is "XXX....", then use SMTP, otherwise use the client.

                     

                    While the mac's and PC's in these conf rooms have dedicated IP's, they sometimes are upgraded and do change. So ideally I would just search for their DNS name to determine how to send the email, SMTP or via client.

                     

                    If there is another way to determine if the user is using one of the machines in the conf room, then I'm open to suggestions, but these machines do change out periodically, and the only constant that I know of is their DNS name.

                     

                    What is the Persistent ID?

                     

                    Can FM 11 determine what the current user login for windows or mac is? If so, then I could just check for that generic name.

                     

                    Thanks,

                    Evan

                    • 7. Re: How to Get Client DNS Name
                      taylorsharpe

                      Ooops, I think Get ( PersistentID ) didn't come out until FM 12.  Sorry about that. 

                       

                      Alternatively, you can get use Get ( SystemNICAddress) to uniquely identify machines based on their Network Interface Card (aka MAC address).  It just is a way of identifying uniquely which machine you are using.  IP's are not unique and are easily changed.  NIC and Persistent IDs are not easily changed.  FYI, I believe the Persistent ID is just an MD5 hash of the NIC address. 

                       

                      Get ( SystemPlatform ) will let you know which platform you are using (Mac, Windows, iOS, etc.)

                      • 8. Re: How to Get Client DNS Name
                        EvanGoldstein

                        Thank you, but the NIC address would change if the machine is changed out. While this does not happen oftern, I can.

                        Is there an asier way to get the DNS in FM13?

                        • 9. Re: How to Get Client DNS Name
                          taylorsharpe

                          So, are you saying that your computers are uniquely identified by their  name server, the name server than anyone can go into system preferences or control panels and just point it to another DNS?  I'm starting to think there needs to be a bigger picture of how your security works and the way you are going to address your security needs. 

                           

                          Can you explain how Users are authenticated, what and why you need to uniquely identify a machine or is it a location (or both), and basically a description of your security (is it FM or External, etc.). 

                          • 10. Re: How to Get Client DNS Name
                            jhaffner

                             

                             

                            Can FM 11 determine what the current user login for windows or mac is? If so, then I could just check for that generic name.

                             

                             

                            IIRC, you should be able to use Get (UserName) and/or Get (AccountName) in FM11. Is this what you mean by DNS name?

                            • 11. Re: How to Get Client DNS Name
                              EvanGoldstein

                              No, the computers are given a specific fully qualified domain name, tied to AD. Users cannot go in and change that.

                              FM uses external authentication, tied to AD.

                               

                              For example the DNS of one of the computers would follow this formula "confroomA.department.building.company". Whle this is unique, the acct that users would use to log into this computer is not unique, but the acct that they use to log into FM, while on that computer is unique.

                              • 12. Re: How to Get Client DNS Name
                                EvanGoldstein

                                I need to find out if users use this login to FM anyplace else otherthan in the conf rooms. If so, then yes I can use that to determine if SMTP is alright.