[ale] desired resolve features

Keith Hopkins hne at hopnet.net
Sun Oct 24 03:28:32 EDT 2004


David Corbin wrote:
> I'd like to be able to do two things:
> 
> 1) in /etc/hosts, or a file like it, be able to enter a "CNAME" (alias) for 
> another host that is resolved "traditionally".
> 

man 5 hosts
               IP_address canonical_hostname aliases

What is the difference between what you refer to as "CNAME" and the "aliases" already provided in /etc/hosts?

If you mean to use /etc/hosts instead of DNS, the be sure your /etc/nsswitch.conf is configured correctly, and whatever tool you are using actually supports it.
man 5 nsswitch.conf
nsswitch.conf  - System Databases and Name Service Switch configuration file
        hosts  Host names and numbers, used  by  gethostbyname(3)  and  similar  functions.

   Lastly, write a script/alias to do something like "awk '/$1/ {print \$1}' /etc/hosts"  (assuming first "$1" is a bash cmd line substitution)

> 2) be able to configure /etc/hosts-like settings on a per-user basis. 

   What are you trying to accomplish here?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3383 bytes
Desc: S/MIME Cryptographic Signature




More information about the Ale mailing list