I am on solaris 9. I also believed the line code below is not good as there is two or three times the exact same lines with the same users. This why my result log contains more users than I have if I am making manually the print screen of the command. I belived the for loop can't work as I need.
I hope you may be help me to make it right.
Thanks
---------- Post updated at 08:00 AM ---------- Previous update was at 07:13 AM ----------
Dear Friends,
thanks a lot for your help. I solved my problem. Sorry for making all of you searching to help me. I am so glad to have you for help.
When users login, they are directed to menu (aix script). The menu enables the user to choose an environment to work in. Each environment has a different group id. When a user chooses a menu option, I want to change his primary group to that specific environment's group id. Is this at all possible... (3 Replies)
Is there a command or better combination of cmds that will give me the list of Unix users in a particular Unix group whether their primary group is that group in question (information stored in /etc/passwd) or they are in a secondary group (information stored in /etc/group).
So far all I got... (5 Replies)
HI
I need to know what is the primary group name of a particular user.
How to do this ?
Maybe with groups cmd ? (first group name in line, is the primary group)
thx for help. (2 Replies)
Hi Experts,
I am new to scripting. We have around 400 Linux servers in our environment. I want to add a new user to a perticular group on all the servers using SSH.
Requirements:
1) Need to take the server names from a text file.
2) Login into each server and check whether perticular... (1 Reply)
Hi,
I have a file with usernames, and the comment section, e.g :
Data removed by request of sanchitadutta91, 20 May 2020
I need to add these users into a server. Is it possible to use a script to create the users, together with the comment ?
From the commandline to add one user, the... (2 Replies)
Discussion started by: anaigini45
2 Replies
LEARN ABOUT HPUX
groupdel
groupdel(1M)groupdel(1M)NAME
groupdel - delete a group from the system
SYNOPSIS
group
DESCRIPTION
The command deletes a group from the system by removing the appropriate entry from the file.
The command must be used with the group argument which is the name of the group to be deleted. The name consists of a string of printable
characters that may not include a colon or newline
Refer to usergroupname(5) to understand the functionality changes with the Numeric User Group Name feature.
Options
The command uses the following option:
Exercise the safe delete feature. That is, if the gid of the
primary group of any system user matches the gid of group, then group is not deleted.
NIS
The command is aware of NIS user entries. Only local groups may be deleted with Attempts to delete an NIS group will result in an error.
NIS groups must be administered from the NIS server. If is used on a system where NIS is installed, it may fail with the error
(return value 6), if the group specified is an NIS group (see group(4)).
RETURN VALUE
exits with one of the following values:
No error.
Invalid command syntax.
Invalid argument supplied to an option.
group
does not exist.
Cannot modify the
file.
file or
file busy. Another command may be modifying the file.
Unable to open
or file is non-existent.
group
is busy or cannot delete the primary group.
EXAMPLES
Delete the group from the file if it exists:
WARNINGS
Because many users may try to write the file simultaneously, a password locking mechanism was devised. If this locking fails after subse-
quent retrying, terminates.
FILES SEE ALSO users(1), groupadd(1M), groupmod(1M), logins(1M), useradd(1M), userdel(1M), usermod(1M), group(4), usergroupname(5).
STANDARDS CONFORMANCE groupdel(1M)