[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 3

mkgroup Command

Purpose

Creates a new group.

Syntax

mkgroup [ -a ] [ -A ] [ Attribute=Value ... ] Group

Description

The mkgroup command creates a new group. The Group parameter must be a unique string of 8-byte or less and cannot be the ALL or default keywords. By default, the mkgroup command creates a standard group. To create an administrative group, specify the -a flag. You must be the root user or a user with GroupAdmin authorization to create an administrative group.

You can use the Web-based System Manager Users application (wsm users fast path) to run this command. You could also use the System Management Interface Tool (SMIT) smit mkgroups fast path to run this command.

Restrictions on Creating Group Names

To prevent login inconsistencies, you should avoid composing group names entirely of uppercase alphabetic characters. While the mkgroup command supports multi-byte group names, it is recommended that you restrict group names to characters with the POSIX portable filename character set.

To ensure that your user database remains uncorrupted, you must be careful when naming groups. Group names must not begin with a - (dash), + (plus sign), @ (at sign), or ~ (tilde). You cannot use the keywords ALL or default in a group name. Additionally, do not use any of the following characters within a group-name string:

: Colon
" Double quote
# Pound sign
, Comma
= Equal sign
\ Back slash
/ Slash
? Question mark
' Single quote
` Back quote

Finally, the Name parameter cannot contain any space, tab, or new-line characters.

Flags

-a Creates an administrative group. Only the root user can use this flag.
-A Sets the group administrator to the person who invoked the mkgroup command.
Attribute=Value Initializes a group with a specific attribute. See the chgroup command for more information about the group attributes.

Security

Access Control: This command should grant execute (x) access only to the root user and members of the security group. This command should be installed as a program in the trusted computing base (TCB). The command should be owned by the root user with the setuid (SUID) bit set.

Files Accessed:

Mode File
rw /etc/passwd
rw /etc/security/user
rw /etc/security/limits
rw /etc/security/environ
rw /etc/group
rw /etc/security/group
r /usr/lib/security/mkuser.default
x /usr/lib/security/mkuser.sys

Auditing Events:

Event Information
USER_Create user

Examples

  1. To create a new group account called finance, enter:
    mkgroup finance
  2. To create a new administrative group account called payroll, enter:
    mkgroup -a payroll
    Only the root user can issue this command.
  3. To create a new group account called managers and set yourself as the administrator, enter:
    mkgroup -A managers
  4. To create a new group account called managers and set the list of administrators to steve and mike, enter:
    mkgroup adms=steve,mike managers
    The users steve and mike must already exist on the system.

Files

/usr/bin/mkgroup Containsthe mkgroup command.
/etc/group Contains the basic attributes of groups.
/etc/security/group Contains the extended attributes of groups.
/etc/passwd Contains basic user information.
/etc/security/passwd Contains password information.

Related Information

The chgroup command, chgrpmem command, chuser command, lsgroup command, lsuser command, mkuser command, passwd command, pwdadm command, rmgroup command, rmuser command, setgroups command, setsenv command.

Setting up and running Web-based System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.

Security Administration in AIX Version 4.3 System Management Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]