Creating a group in AIX is simple and straightforward. The same restrictions for creating a user pertain to creating a group:
- Groups cannot start with the:
- Dash or minus sign (
-
). - Plus sign (
+
) - At symbol (
@
) - Tilde (
~
)
- Dash or minus sign (
- Groups cannot be named ALL or default, as these names are reserved to the operating system.
- Group names cannot include:
- Colon (
:
) - Quotation marks—single or double (
'
or"
) - Pound or hash sign (
#
) - Comma (
,
) - Equal sign (
=
) - Slashes—back or forward (
\
or/
) - Question mark (
?
) - Back quote or tick (
`
) - White space (space or tab)
- New-line characters
- Colon (
- Group names can only be eight characters or less in AIX version 5.2 and earlier. Starting with AIX version 5.3, IBM increased the maximum number of characters to 255.
Both user and group name lengths are handled by the same parameter:
v_max_logname
. To view or change the value, follow the instructions provided for viewing and changing the user name length in mkuser, earlier in this article.To create a group, simply execute the
mkgroup
command with the group name as an argument, as shown in Listing.Listing Create a group with mkgroup
# mkgroup atctest
# grep atctest /etc/group
atctest:!:202:
# grep -p atctest /etc/security/group
atctest:
admin = false
|
To create an admin group, add the
-a
switch, as shown in Listing.Listing Create an admin group
# mkgroup -a atcadmin
# grep atcadmin /etc/group
atcadmin:!:15:
# grep -p atcadmin /etc/security/group
atcadmin:
admin = true
|
To create a group and add Xander as the administrator of the group, add the
adm
section of the /etc/security/group stanza to the command line, as shown in Listing.Listing Add a specific user as a group administrator
# mkgroup adms=xander xangroup
# grep xangroup /etc/group
xangroup:!:203:
# grep -p xangroup /etc/security/group
xangroup:
admin = false
adms = xander
|
Like
mkuser
, mkgroup
follows the same attributes as chgroup
. For a full list of the attributes, read chgroup
's man page (man chgroup
).
No comments:
Post a Comment