[Puppet Users] Re: Mac Domainname and facter
OK, seems that there are two places where a resolv.conf file is located. This is on Max OS X 10.5.8. /private/etc/resolv.conf /private/var/run/resolv.conf The only one of these that gets updated via DHCP is the /private/var/ run/resolv.conf file. Facter does not seem to look at this file although the Mac uses this file for name resolution etc... If I copy the /private/var/run/resolv.conf file to /private/etc/resolv.conf, then facter reports the correct domain-name. As I mention above, the Mac seems to only use the /private/var/run/ resolv.conf for its DNS functionality. Completely removing the / private/etc/resolv.conf has no effect on the machine's ability to browse the internet and resolve names/ip addresses. Perhaps, facter should ignore the /private/etc/resolv.conf file and rely on the /private/var/run/resolv.conf file??? I can solve my issue with a startup script, but I would rather have facter do the work for me. Thanks, Kurt On Sep 23, 12:23 pm, Allan Marcus al...@lanl.gov wrote: domainname is only relevant if you are using NIS. The larger issue here, IMHO, is why the hostname command is not returning the correct host name. Sounds like you may hve a problem with your DNS resolution. We have noticed _sometimes_ that if our domain name is not in the search domain field in the network set up, the hostname command doesn't work right. If you focus on getting hostname to return the correct value you will solve your facter domain issue. --- Thanks, Allan Marcus 505-667-5666 On Sep 23, 2009, at 9:51 AM, engle wrote: Yes, that is true. Hostname is reporting wrong and so is facter. The issue is that the mac is picking up the correct domainname from the DHCP server, but facter is not. The 'domainname' command returns nothing. The other issue is that the 'ipconfig getpacket en0' command returns the proper domain name but the resolv.conf does not. It seems that our DHCP config is correct or the 'ipconfig' command would fail. But it is the 'resolv.conf' that is incorrect in this. So perhaps there is something that I am missing in how the mac sets the resolv.conf file via DHCP. -kurt On Sep 23, 7:05 am, Allan Marcus al...@lanl.gov wrote: Compare: hostname to facter | grep -i FQDN they should be the same. The domain name is just going to be the FQDN minus everything upto the first period. --- Thanks, Allan Marcus 505-667-5666 On Sep 22, 2009, at 5:07 PM, engle wrote: So, when I issue the command: ipconfig getpacket en0 I get the proper domain name from DHCP. But, 'facter', does not display this when reporting the 'domain' or in the FQDN . Both of these list local for the domain name of the computer. In addition, in my 'resolv.conf', the correct domain name is listed as a 'search' domain as well as a general domain statement. So, I am still a bit unsure as to where facter is getting its infomation. -kurt On Sep 18, 11:33 am, Nigel Kersten nig...@google.com wrote: On Fri, Sep 18, 2009 at 11:16 AM, Allan Marcus al...@lanl.gov wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. No, if you're using DHCP it should fall to resolv.conf which is automatically generated by data provided by DHCP to the interface for the SystemConfiguration framework. It'll try dnsdomainname first, which will fail, thendomainname, which will be empty unless you're attached to NIS, then resolv.conf It will pick any domain entry, if that doesn't exist, then fall back to search domains. You should be getting exactly the same results as you see when dumping a DHCP response with ipconfig getpacket en1 (en0 or whatever) OS X clients have ComputerName and LocalHostName in SystemConfiguration as well, which are what are set via the Sharing prefpane. These are independent of actual domain names, but the fact that terminal prompts fall back to them in some situations often confuses people. scutil --get ComputerName scutil --get LocalHostName --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname anddomainname. Which one does facter use? Thanks,
[Puppet Users] Re: Mac Domainname and facter
On Tue, Sep 29, 2009 at 1:30 PM, engle kurt.en...@gmail.com wrote: OK, seems that there are two places where a resolv.conf file is located. This is on Max OS X 10.5.8. /private/etc/resolv.conf /private/var/run/resolv.conf The only one of these that gets updated via DHCP is the /private/var/ run/resolv.conf file. Facter does not seem to look at this file although the Mac uses this file for name resolution etc... If I copy the /private/var/run/resolv.conf file to /private/etc/resolv.conf, then facter reports the correct domain-name. nigelk$ ls -la /etc/resolv.conf lrwxr-xr-x 1 root wheel 20 Jul 1 16:18 /etc/resolv.conf - /var/run/resolv.conf That's should be the default setup. As I mention above, the Mac seems to only use the /private/var/run/ resolv.conf for its DNS functionality. Completely removing the / private/etc/resolv.conf has no effect on the machine's ability to browse the internet and resolve names/ip addresses. Perhaps, facter should ignore the /private/etc/resolv.conf file and rely on the /private/var/run/resolv.conf file??? I can solve my issue with a startup script, but I would rather have facter do the work for me. Thanks, Kurt On Sep 23, 12:23 pm, Allan Marcus al...@lanl.gov wrote: domainname is only relevant if you are using NIS. The larger issue here, IMHO, is why the hostname command is not returning the correct host name. Sounds like you may hve a problem with your DNS resolution. We have noticed _sometimes_ that if our domain name is not in the search domain field in the network set up, the hostname command doesn't work right. If you focus on getting hostname to return the correct value you will solve your facter domain issue. --- Thanks, Allan Marcus 505-667-5666 On Sep 23, 2009, at 9:51 AM, engle wrote: Yes, that is true. Hostname is reporting wrong and so is facter. The issue is that the mac is picking up the correct domainname from the DHCP server, but facter is not. The 'domainname' command returns nothing. The other issue is that the 'ipconfig getpacket en0' command returns the proper domain name but the resolv.conf does not. It seems that our DHCP config is correct or the 'ipconfig' command would fail. But it is the 'resolv.conf' that is incorrect in this. So perhaps there is something that I am missing in how the mac sets the resolv.conf file via DHCP. -kurt On Sep 23, 7:05 am, Allan Marcus al...@lanl.gov wrote: Compare: hostname to facter | grep -i FQDN they should be the same. The domain name is just going to be the FQDN minus everything upto the first period. --- Thanks, Allan Marcus 505-667-5666 On Sep 22, 2009, at 5:07 PM, engle wrote: So, when I issue the command: ipconfig getpacket en0 I get the proper domain name from DHCP. But, 'facter', does not display this when reporting the 'domain' or in the FQDN . Both of these list local for the domain name of the computer. In addition, in my 'resolv.conf', the correct domain name is listed as a 'search' domain as well as a general domain statement. So, I am still a bit unsure as to where facter is getting its infomation. -kurt On Sep 18, 11:33 am, Nigel Kersten nig...@google.com wrote: On Fri, Sep 18, 2009 at 11:16 AM, Allan Marcus al...@lanl.gov wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. No, if you're using DHCP it should fall to resolv.conf which is automatically generated by data provided by DHCP to the interface for the SystemConfiguration framework. It'll try dnsdomainname first, which will fail, thendomainname, which will be empty unless you're attached to NIS, then resolv.conf It will pick any domain entry, if that doesn't exist, then fall back to search domains. You should be getting exactly the same results as you see when dumping a DHCP response with ipconfig getpacket en1 (en0 or whatever) OS X clients have ComputerName and LocalHostName in SystemConfiguration as well, which are what are set via the Sharing prefpane. These are independent of actual domain names, but the fact that terminal prompts fall back to them in some situations often confuses people. scutil --get ComputerName scutil --get LocalHostName --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is
[Puppet Users] Re: Mac Domainname and facter
2009/9/23 engle kurt.en...@gmail.com: So, when I issue the command: ipconfig getpacket en0 I get the proper domain name from DHCP. But, 'facter', does not display this when reporting the 'domain' or in the FQDN . Both of these list local for the domain name of the computer. In addition, in my 'resolv.conf', the correct domain name is listed as a 'search' domain as well as a general domain statement. So, I am still a bit unsure as to where facter is getting its infomation. The current domain name stuff is a bit horky, and there are some patches/issues for 1.6 to address this: http://projects.reductivelabs.com/issues/2533 Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Mac Domainname and facter
Compare: hostname to facter | grep -i FQDN they should be the same. The domain name is just going to be the FQDN minus everything upto the first period. --- Thanks, Allan Marcus 505-667-5666 On Sep 22, 2009, at 5:07 PM, engle wrote: So, when I issue the command: ipconfig getpacket en0 I get the proper domain name from DHCP. But, 'facter', does not display this when reporting the 'domain' or in the FQDN . Both of these list local for the domain name of the computer. In addition, in my 'resolv.conf', the correct domain name is listed as a 'search' domain as well as a general domain statement. So, I am still a bit unsure as to where facter is getting its infomation. -kurt On Sep 18, 11:33 am, Nigel Kersten nig...@google.com wrote: On Fri, Sep 18, 2009 at 11:16 AM, Allan Marcus al...@lanl.gov wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. No, if you're using DHCP it should fall to resolv.conf which is automatically generated by data provided by DHCP to the interface for the SystemConfiguration framework. It'll try dnsdomainname first, which will fail, thendomainname, which will be empty unless you're attached to NIS, then resolv.conf It will pick any domain entry, if that doesn't exist, then fall back to search domains. You should be getting exactly the same results as you see when dumping a DHCP response with ipconfig getpacket en1 (en0 or whatever) OS X clients have ComputerName and LocalHostName in SystemConfiguration as well, which are what are set via the Sharing prefpane. These are independent of actual domain names, but the fact that terminal prompts fall back to them in some situations often confuses people. scutil --get ComputerName scutil --get LocalHostName --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname anddomainname. Which one does facter use? Thanks, -kurt -- Nigel Kersten nig...@google.com System Administrator Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Mac Domainname and facter
Yes, that is true. Hostname is reporting wrong and so is facter. The issue is that the mac is picking up the correct domainname from the DHCP server, but facter is not. The 'domainname' command returns nothing. The other issue is that the 'ipconfig getpacket en0' command returns the proper domain name but the resolv.conf does not. It seems that our DHCP config is correct or the 'ipconfig' command would fail. But it is the 'resolv.conf' that is incorrect in this. So perhaps there is something that I am missing in how the mac sets the resolv.conf file via DHCP. -kurt On Sep 23, 7:05 am, Allan Marcus al...@lanl.gov wrote: Compare: hostname to facter | grep -i FQDN they should be the same. The domain name is just going to be the FQDN minus everything upto the first period. --- Thanks, Allan Marcus 505-667-5666 On Sep 22, 2009, at 5:07 PM, engle wrote: So, when I issue the command: ipconfig getpacket en0 I get the proper domain name from DHCP. But, 'facter', does not display this when reporting the 'domain' or in the FQDN . Both of these list local for the domain name of the computer. In addition, in my 'resolv.conf', the correct domain name is listed as a 'search' domain as well as a general domain statement. So, I am still a bit unsure as to where facter is getting its infomation. -kurt On Sep 18, 11:33 am, Nigel Kersten nig...@google.com wrote: On Fri, Sep 18, 2009 at 11:16 AM, Allan Marcus al...@lanl.gov wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. No, if you're using DHCP it should fall to resolv.conf which is automatically generated by data provided by DHCP to the interface for the SystemConfiguration framework. It'll try dnsdomainname first, which will fail, thendomainname, which will be empty unless you're attached to NIS, then resolv.conf It will pick any domain entry, if that doesn't exist, then fall back to search domains. You should be getting exactly the same results as you see when dumping a DHCP response with ipconfig getpacket en1 (en0 or whatever) OS X clients have ComputerName and LocalHostName in SystemConfiguration as well, which are what are set via the Sharing prefpane. These are independent of actual domain names, but the fact that terminal prompts fall back to them in some situations often confuses people. scutil --get ComputerName scutil --get LocalHostName --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname anddomainname. Which one does facter use? Thanks, -kurt -- Nigel Kersten nig...@google.com System Administrator Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Mac Domainname and facter
On Tue, Sep 22, 2009 at 4:07 PM, engle kurt.en...@gmail.com wrote: So, when I issue the command: ipconfig getpacket en0 I get the proper domain name from DHCP. But, 'facter', does not display this when reporting the 'domain' or in the FQDN . Both of these list local for the domain name of the computer. In addition, in my 'resolv.conf', the correct domain name is listed as a 'search' domain as well as a general domain statement. So, I am still a bit unsure as to where facter is getting its infomation. Can you paste the full output of an ipconfig getpacket and your resolv.conf, scrubbing whatever details you need to? -kurt On Sep 18, 11:33 am, Nigel Kersten nig...@google.com wrote: On Fri, Sep 18, 2009 at 11:16 AM, Allan Marcus al...@lanl.gov wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. No, if you're using DHCP it should fall to resolv.conf which is automatically generated by data provided by DHCP to the interface for the SystemConfiguration framework. It'll try dnsdomainname first, which will fail, thendomainname, which will be empty unless you're attached to NIS, then resolv.conf It will pick any domain entry, if that doesn't exist, then fall back to search domains. You should be getting exactly the same results as you see when dumping a DHCP response with ipconfig getpacket en1 (en0 or whatever) OS X clients have ComputerName and LocalHostName in SystemConfiguration as well, which are what are set via the Sharing prefpane. These are independent of actual domain names, but the fact that terminal prompts fall back to them in some situations often confuses people. scutil --get ComputerName scutil --get LocalHostName --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname anddomainname. Which one does facter use? Thanks, -kurt -- Nigel Kersten nig...@google.com System Administrator Google Inc. -- nigel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Mac Domainname and facter
Here is the output from one of the many computers that are exhibiting this behavior: resolv.conf: domain lane.edu. nameserver 158.165.1.26 nameserver 158.165.1.20 sh-3.2# ipconfig getpacket en0 op = BOOTREPLY htype = 1 flags = 0 hlen = 6 hops = 1 xid = 485302252 secs = 0 ciaddr = 0.0.0.0 yiaddr = 158.165.86.51 siaddr = 0.0.0.0 giaddr = 158.165.86.1 chaddr = 0:25:0:d2:51:a2 sname = edlane file = options: Options count is 10 dhcp_message_type (uint8): ACK 0x5 server_identifier (ip): 158.165.1.26 lease_time (uint32): 0xa8c0 subnet_mask (ip): 255.255.255.0 router (ip_mult): {158.165.86.1} domain_name_server (ip_mult): {158.165.1.26, 158.165.1.20} domain_name (string): twin-oaks.lane.edu nb_over_tcpip_name_server (ip_mult): {158.165.1.38, 158.165.1.52} nb_over_tcpip_node_type (uint8): 0x8 end (none): sh-3.2# facter domain = lane.edu. facterversion = 1.5.4 fqdn = YM913AKG6MH.lane.edu. hardwaremodel = i386 hostname = YM913AKG6MH interfaces = lo0,gif0,stf0,en0,fw0,en1 ipaddress = 158.165.86.51 ipaddress_en0 = 158.165.86.51 ipaddress_lo0 = 127.0.0.1 kernel = Darwin kernelrelease = 9.8.0 kernelversion = 9.8.0 macaddress = 00:25:00:d2:51:a2 macaddress_en0 = 00:25:00:d2:51:a2 macaddress_en1 = 00:25:4b:87:b9:56 macaddress_fw0 = 00:25:00:ff:fe:d2 macosx_buildversion = 9L31a macosx_productname = Mac OS X macosx_productversion = 10.5.8 netmask_en0 = 255.255.255.0 netmask_lo0 = 255.0.0.0 network_en0 = 158.165.86.0 network_lo0 = 127.0.0.0 operatingsystem = Darwin operatingsystemrelease = 9.8.0 ps = ps auxwww puppetversion = 0.24.8 rubyversion = 1.8.6 sp_boot_mode = normal_boot sp_boot_rom_version = IM91.008D.B08 sp_boot_volume = Macintosh HD sp_bus_speed = 1.07 GHz sp_cpu_type = Intel Core 2 Duo sp_current_processor_speed = 2 GHz sp_kernel_version = Darwin 9.8.0 sp_l2_cache = 3 MB sp_local_host_name = YM913AKG6MH sp_machine_model = iMac9,1 sp_machine_name = iMac sp_number_processors = 2 sp_os_version = Mac OS X 10.5.8 (9L31a) sp_packages = 1 sp_physical_memory = 1 GB sp_platform_uuid = 9F4A5996-8A4C-5C7C-AAF3-2F9F68E80A0B sp_serial_number = YM913AKG6MH sp_smc_version_system = 1.44f0 sp_uptime = up 6:22:19:39 sp_user_name = System Administrator (root) timezone = PDT Thanks -kurt On Sep 23, 8:55 am, Nigel Kersten nig...@google.com wrote: On Tue, Sep 22, 2009 at 4:07 PM, engle kurt.en...@gmail.com wrote: So, when I issue the command: ipconfig getpacket en0 I get the proper domain name from DHCP. But, 'facter', does not display this when reporting the 'domain' or in the FQDN . Both of these list local for the domain name of the computer. In addition, in my 'resolv.conf', the correct domain name is listed as a 'search' domain as well as a general domain statement. So, I am still a bit unsure as to where facter is getting its infomation. Can you paste the full output of an ipconfig getpacket and your resolv.conf, scrubbing whatever details you need to? -kurt On Sep 18, 11:33 am, Nigel Kersten nig...@google.com wrote: On Fri, Sep 18, 2009 at 11:16 AM, Allan Marcus al...@lanl.gov wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. No, if you're using DHCP it should fall to resolv.conf which is automatically generated by data provided by DHCP to the interface for the SystemConfiguration framework. It'll try dnsdomainname first, which will fail, thendomainname, which will be empty unless you're attached to NIS, then resolv.conf It will pick any domain entry, if that doesn't exist, then fall back to search domains. You should be getting exactly the same results as you see when dumping a DHCP response with ipconfig getpacket en1 (en0 or whatever) OS X clients have ComputerName and LocalHostName in SystemConfiguration as well, which are what are set via the Sharing prefpane. These are independent of actual domain names, but the fact that terminal prompts fall back to them in some situations often confuses people. scutil --get ComputerName scutil --get LocalHostName --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname anddomainname. Which one does facter use? Thanks, -kurt -- Nigel Kersten nig...@google.com
[Puppet Users] Re: Mac Domainname and facter
domainname is only relevant if you are using NIS. The larger issue here, IMHO, is why the hostname command is not returning the correct host name. Sounds like you may hve a problem with your DNS resolution. We have noticed _sometimes_ that if our domain name is not in the search domain field in the network set up, the hostname command doesn't work right. If you focus on getting hostname to return the correct value you will solve your facter domain issue. --- Thanks, Allan Marcus 505-667-5666 On Sep 23, 2009, at 9:51 AM, engle wrote: Yes, that is true. Hostname is reporting wrong and so is facter. The issue is that the mac is picking up the correct domainname from the DHCP server, but facter is not. The 'domainname' command returns nothing. The other issue is that the 'ipconfig getpacket en0' command returns the proper domain name but the resolv.conf does not. It seems that our DHCP config is correct or the 'ipconfig' command would fail. But it is the 'resolv.conf' that is incorrect in this. So perhaps there is something that I am missing in how the mac sets the resolv.conf file via DHCP. -kurt On Sep 23, 7:05 am, Allan Marcus al...@lanl.gov wrote: Compare: hostname to facter | grep -i FQDN they should be the same. The domain name is just going to be the FQDN minus everything upto the first period. --- Thanks, Allan Marcus 505-667-5666 On Sep 22, 2009, at 5:07 PM, engle wrote: So, when I issue the command: ipconfig getpacket en0 I get the proper domain name from DHCP. But, 'facter', does not display this when reporting the 'domain' or in the FQDN . Both of these list local for the domain name of the computer. In addition, in my 'resolv.conf', the correct domain name is listed as a 'search' domain as well as a general domain statement. So, I am still a bit unsure as to where facter is getting its infomation. -kurt On Sep 18, 11:33 am, Nigel Kersten nig...@google.com wrote: On Fri, Sep 18, 2009 at 11:16 AM, Allan Marcus al...@lanl.gov wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. No, if you're using DHCP it should fall to resolv.conf which is automatically generated by data provided by DHCP to the interface for the SystemConfiguration framework. It'll try dnsdomainname first, which will fail, thendomainname, which will be empty unless you're attached to NIS, then resolv.conf It will pick any domain entry, if that doesn't exist, then fall back to search domains. You should be getting exactly the same results as you see when dumping a DHCP response with ipconfig getpacket en1 (en0 or whatever) OS X clients have ComputerName and LocalHostName in SystemConfiguration as well, which are what are set via the Sharing prefpane. These are independent of actual domain names, but the fact that terminal prompts fall back to them in some situations often confuses people. scutil --get ComputerName scutil --get LocalHostName --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname anddomainname. Which one does facter use? Thanks, -kurt -- Nigel Kersten nig...@google.com System Administrator Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Mac Domainname and facter
So, when I issue the command: ipconfig getpacket en0 I get the proper domain name from DHCP. But, 'facter', does not display this when reporting the 'domain' or in the FQDN . Both of these list local for the domain name of the computer. In addition, in my 'resolv.conf', the correct domain name is listed as a 'search' domain as well as a general domain statement. So, I am still a bit unsure as to where facter is getting its infomation. -kurt On Sep 18, 11:33 am, Nigel Kersten nig...@google.com wrote: On Fri, Sep 18, 2009 at 11:16 AM, Allan Marcus al...@lanl.gov wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. No, if you're using DHCP it should fall to resolv.conf which is automatically generated by data provided by DHCP to the interface for the SystemConfiguration framework. It'll try dnsdomainname first, which will fail, thendomainname, which will be empty unless you're attached to NIS, then resolv.conf It will pick any domain entry, if that doesn't exist, then fall back to search domains. You should be getting exactly the same results as you see when dumping a DHCP response with ipconfig getpacket en1 (en0 or whatever) OS X clients have ComputerName and LocalHostName in SystemConfiguration as well, which are what are set via the Sharing prefpane. These are independent of actual domain names, but the fact that terminal prompts fall back to them in some situations often confuses people. scutil --get ComputerName scutil --get LocalHostName --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname anddomainname. Which one does facter use? Thanks, -kurt -- Nigel Kersten nig...@google.com System Administrator Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Mac Domainname and facter
/Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname and domainname. Which one does facter use? Thanks, -kurt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Mac Domainname and facter
whoops, /Library/Ruby/Site/1.8/facter/hostname.rb also seems to play a part. The hostname command is used, then it's parsed with regex magic. --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 12:16 PM, Allan Marcus wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname and domainname. Which one does facter use? Thanks, -kurt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---
[Puppet Users] Re: Mac Domainname and facter
On Fri, Sep 18, 2009 at 11:16 AM, Allan Marcus al...@lanl.gov wrote: /Library/Ruby/Site/1.8/facter/domain.rb I think for the Mac you need to set the search domain in the Network System Pref, and that is what facter uses, but I'm not sure I'm reading the code right. No, if you're using DHCP it should fall to resolv.conf which is automatically generated by data provided by DHCP to the interface for the SystemConfiguration framework. It'll try dnsdomainname first, which will fail, then domainname, which will be empty unless you're attached to NIS, then resolv.conf It will pick any domain entry, if that doesn't exist, then fall back to search domains. You should be getting exactly the same results as you see when dumping a DHCP response with ipconfig getpacket en1 (en0 or whatever) OS X clients have ComputerName and LocalHostName in SystemConfiguration as well, which are what are set via the Sharing prefpane. These are independent of actual domain names, but the fact that terminal prompts fall back to them in some situations often confuses people. scutil --get ComputerName scutil --get LocalHostName --- Thanks, Allan Marcus 505-667-5666 On Sep 18, 2009, at 10:11 AM, engle wrote: We have a large number of Macs that are using puppet to install packages. The source of the packages is determined by the domain name of the client. We are using ISC's dhcpd. The macs seem to pick up the correct domain name from the dhcp server but facter is not picking it up. If I type domainname at a shell prompt, I get nothing. However, when the client requests a cert from the puppet server, it is requested with the FQDN which is correct. So, where does facter get its domain name information from on the client. I know that Macs have a number of places where they store and use hostname and domainname. Which one does facter use? Thanks, -kurt -- Nigel Kersten nig...@google.com System Administrator Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---