About Linux FAQ

Browse More FAQs:

What does a plus + at the beginning of a line in the /etc/passwd UNIX / Linux password file signify?

Posted by Vivek Gite [Last updated: May 14, 2007]

Q. I’m new to UNIX and we are using HP-UX and Solaris system here. What does a plus (+) or a minus (-) at the beginning of a line in the password (/etc/passwd) file signify?

A. The /etc/passwd file under UNIX/Linux operating system can have + or – minus symbol. The password file can contain entries beginning with a + (plus sign) or - (minus sign) to selectively incorporate entries from another naming service source, such as NIS, NIS+, or LDAP.

According to man page:
A line beginning with a plus (+) is used to incorporate entries from the Network Information System. There are three styles of + entries:

  • + : Insert the entire contents of the Network Information System password file at that point;
  • +name : Insert the entry (if any) for name from the Network Information System at that point
  • +@name : Insert the entries for all members of the network group name at that point.
  • If a + entry has a non-null password, directory, gecos, or shell field, they override what is contained in the Network Information System. The numerical user ID and group ID fields cannot be overridden.

The passwd file can also have lines beginning with a minus (-), which disallow entries from the Network Information System. There are two styles of - entries:

  • -name : Disallow any subsequent entries (if any) for name.
  • -@name : Disallow any subsequent entries for all members of the network group name.

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.