Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Apropos / Subsearch:
optional field

 groupadd(1M)							groupadd(1M)

      groupadd - add a new group to the system

      groupadd [-g gid [-o] ] group

      The groupadd command creates a new group on the system by adding the
      appropriate entry to the /etc/group file.	 The groupadd command
      expects the group argument, which is the name of the new group.  The
      name consists of a string of printable characters that may not include
      a colon (:) or newline (\n).

      The groupadd command may be used with the following options:

	   -g gid    Specifies the group ID for the new group.	gid must be
		     a non-negative decimal integer less than MAXUID as
		     defined in the <param.h> header file.  By default the
		     next available unique group ID in the valid range is
		     allocated.	 Group IDs in the range 0-99 are reserved.

	   -o	     Allow the gid to be non-unique (i.e., a duplicate).

      The groupadd command is aware of NIS user entries.  Only local groups
      may be added with this command.  Attempts to add an NIS group will
      result in an error.  NIS groups must be administered from the NIS
      server.  If groupadd is used on a system where NIS is installed, it
      may fail with the error

	   group x is not unique

      (return value 9) if the group specified is not present in the local
      /etc/group file, but is an NIS group (see group(4)).  NIS groups are
      also checked when verifying uniqueness of the new gid, which may
      result in the error

	   GID # is not unique

      (return value 4).

      The groupadd command exits with one of the following values:

	   0	No error.
	   2	Invalid command syntax.
	   3	Invalid argument supplied to an option.
	   4	gid is not unique (when -o is not used).
	   9	group is not unique.

 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000

 groupadd(1M)							groupadd(1M)

	   10	Cannot modify the /etc/group file.
	   11	/etc/passwd file or /etc/ptmp file busy. Another command may
		be modifying the /etc/passwd file.
	   12	Unable to open /etc/ptmp file or /etc/passwd file is non-

      Add the group project1 to the /etc/group file.

	   groupadd project1

      Add the group project12 to the /etc/group file with the group ID 111
      as long as no group currently exists with a group ID of 111.

	   groupadd -g 111 project12

      As many users may try to write the /etc/passwd file simultaneously, a
      passwd locking mechanism was deviced.  If this locking fails after
      subsequent retrying, groupadd terminates.


      users(1), groupdel(1M), groupmod(1M), logins(1M), useradd(1M),
      userdel(1M), usermod(1M), group(4).

      groupadd: SVID3

 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000