Getent

From Notes_Wiki
Revision as of 04:37, 13 November 2012 by Saurabh (talk | contribs) (Created page with "=getent= On systems that use ldap or other similar mechanims for maintaining /etc/hosts, /etc/passwd, /etc/group etc. files instead of using '<tt>cat /etc/passwd</tt>' we sho...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

getent

On systems that use ldap or other similar mechanims for maintaining /etc/hosts, /etc/passwd, /etc/group etc. files instead of using 'cat /etc/passwd' we should use 'getent passwd to get passwd entries from local file as well as from other sources.

'getent' also supports following other arguments

  • ahosts
  • ahostsv4
  • ahostsv6
  • aliases
  • ethers
  • group
  • gshadow
  • hosts
  • netgroup
  • networks
  • passwd
  • protocols
  • rpc
  • services
  • shadow