10-06-2006
Adding new groups!!
I want to know how we can add a new group in solaris. As per my understanding this is done by adding a new entry in /etc/groups file (or by using groupadd command which will also add the entry in the groups file). But when I use group command to see the groups to which I belong, it shows my userid is a part of mqm group, but there is no entry for mqm in /etc/groups file. Am I missing something???
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How do I add a user to a group? And how do I determine the list of groups to add a user?
Solaris 10 newbie (1 Reply)
Discussion started by: peteythapitbull
1 Replies
2. AIX
Hello
A couple of weeks ago, I added a user to an AIX 5.3 system.
I go to add one today, and it appears that when creating a user in smit, I cannot see any groups.
No primary groups
No Group set
No Admin Groups
The /etc/group and etc/secuity/group files seem to be intact.
I did... (4 Replies)
Discussion started by: mhenryj
4 Replies
3. Shell Programming and Scripting
I have some groups and when i issue a command like
groups $LOGNAME
it displays in one line
rfautosys c2ru cash2
I want to fetch only group starting with c2 but when i grep i am getting full line. Can someone advise
on this please as how i can get output as c2ru? (2 Replies)
Discussion started by: gehlnar
2 Replies
4. Solaris
how to create 1000 users in 1 group (0 Replies)
Discussion started by: tirupathi
0 Replies
5. Solaris
1 user in member of 4 groups find file permissions and default group (1 Reply)
Discussion started by: tirupathi
1 Replies
6. Shell Programming and Scripting
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies
7. UNIX for Dummies Questions & Answers
Must I be in a group? I am using Ubuntu and am the only user on my PC. I know how to change groups but do not see a way to not be in a group. Any help would be appreciated. (2 Replies)
Discussion started by: nthepines
2 Replies
8. Post Here to Contact Site Administrators and Moderators
Majority of the questions are pertaining file/string parsing w.r.t
sed
or
awk
It would be nice to have these two as their own sub category under shell-programming-scripting which can avoid lot of duplicate posts. (1 Reply)
Discussion started by: jville
1 Replies
9. Shell Programming and Scripting
Hi,
I am looking at a slightly different sorting problem and I am not sure how to do it in bash.
I have the following input:
0 ... (8 Replies)
Discussion started by: jamie_123
8 Replies
10. UNIX for Beginners Questions & Answers
I have an array in an external file, "array.txt", which contains:
char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
LEARN ABOUT OPENSOLARIS
groupadd
groupadd(1M) System Administration Commands groupadd(1M)
NAME
groupadd - add (create) a new group definition on the system
SYNOPSIS
/usr/sbin/groupadd [-g gid [-o]] group
DESCRIPTION
The groupadd command creates a new group definition on the system by adding the appropriate entry to the /etc/group file.
OPTIONS
The following options are supported:
-g gid Assigns the group id gid for the new group. This group id must be a non-negative decimal integer below MAXUID as defined in
/usr/include/sys/param.h. The group ID defaults to the next available (unique) number above the highest number currently
assigned. For example, if groups 100, 105, and 200 are assigned as groups, the next default group number will be 201. (Group
IDs from 0-99 are reserved by SunOS for future applications.)
-o Allows the gid to be duplicated (non-unique).
OPERANDS
The following operands are supported:
group A string consisting of characters from the set of lower case alphabetic characters and numeric characters. A warning message will
be written if the string exceeds MAXGLEN, which is usually set at eight characters. The group field must contain at least one
character; it accepts lower case or numeric characters or a combination of both, and must not contain a colon (:) or NEWLINE.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
2 Invalid command syntax. A usage message for the groupadd command is displayed.
3 An invalid argument was provided to an option.
4 The gid is not unique (when -o option is not used).
9 The group is not unique.
10 The /etc/group file cannot be updated.
FILES
o /etc/group
o /usr/include/userdefs.h
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
users(1B), groupdel(1M), groupmod(1M), grpck(1M), logins(1M), pwck(1M), useradd(1M), userdel(1M), usermod(1M), group(4), attributes(5)
NOTES
groupadd only adds a group definition to the local system. If a network name service such as NIS or NIS+ is being used to supplement the
local /etc/group file with additional entries, groupadd cannot change information supplied by the network name service. However, groupadd
will verify the uniqueness of group name and group ID against the external name service.
If the number of characters in a group entry exceeds 2047, group maintenance commands, such as groupdel(1M) and groupmod(1M), fail.
SunOS 5.11 27 Aug 2008 groupadd(1M)