NEWGRP(1) User Commands NEWGRP(1)NAME
newgrp - log in to a new group
SYNOPSIS
newgrp [-] [group]
DESCRIPTION
The newgrp command is used to change the current group ID during a login session. If the optional - flag is given, the user's environment
will be reinitialized as though the user had logged in, otherwise the current environment, including current working directory, remains
unchanged.
newgrp changes the current real group ID to the named group, or to the default group listed in /etc/passwd if no group name is given.
newgrp also tries to add the group to the user groupset. If not root, the user will be prompted for a password if she does not have a
password (in /etc/shadow if this user has an entry in the shadowed password file, or in /etc/passwd otherwise) and the group does, or if
the user is not listed as a member and the group has a password. The user will be denied access if the group password is empty and the user
is not listed as a member.
If there is an entry for this group in /etc/gshadow, then the list of members and the password of this group will be taken from this file,
otherwise, the entry in /etc/group is considered.
CONFIGURATION
The following configuration variables in /etc/login.defs change the behavior of this tool:
SYSLOG_SG_ENAB (boolean)
Enable "syslog" logging of sg activity.
FILES
/etc/passwd
User account information.
/etc/shadow
Secure user account information.
/etc/group
Group account information.
/etc/gshadow
Secure group account information.
SEE ALSO id(1), login(1), su(1), sg(1), gpasswd(1), group(5), gshadow(5).
shadow-utils 4.5 01/25/2018 NEWGRP(1)
Check Out this Related Man Page
NEWGRP(1) User Commands NEWGRP(1)NAME
newgrp - log in to a new group
SYNOPSIS
newgrp [-] [group]
DESCRIPTION
The newgrp command is used to change the current group ID during a login session. If the optional - flag is given, the user's environment
will be reinitialized as though the user had logged in, otherwise the current environment, including current working directory, remains
unchanged.
newgrp changes the current real group ID to the named group, or to the default group listed in /etc/passwd if no group name is given.
newgrp also tries to add the group to the user groupset. If not root, the user will be prompted for a password if she does not have a
password (in /etc/shadow if this user has an entry in the shadowed password file, or in /etc/passwd otherwise) and the group does, or if
the user is not listed as a member and the group has a password. The user will be denied access if the group password is empty and the user
is not listed as a member.
If there is an entry for this group in /etc/gshadow, then the list of members and the password of this group will be taken from this file,
otherwise, the entry in /etc/group is considered.
CONFIGURATION
The following configuration variables in /etc/login.defs change the behavior of this tool:
SYSLOG_SG_ENAB (boolean)
Enable "syslog" logging of sg activity.
FILES
/etc/passwd
User account information.
/etc/shadow
Secure user account information.
/etc/group
Group account information.
/etc/gshadow
Secure group account information.
SEE ALSO id(1), login(1), su(1), sg(1), gpasswd(1), group(5), gshadow(5).
shadow-utils 4.5 01/25/2018 NEWGRP(1)
Hello,
Another newbie here and here is my dilemma. I created an account for me on Solaris 8 and I added myself to the root group. But when I login using that account I am unable to do superuser tasks.. (add users, admintool, etc). What am I missing? Thanks in advance..
Andre (5 Replies)
I have created user in AIX 4.3.3 which the member of staff group.
but during login ( with su command) it gives the error
"can not set process environment "
but when it is member of another group -dba -which is the group for oracle database- it works properly.
Pls let me know the solution.
... (5 Replies)
Now, its been a while since i done this but I had to add a user to a group. I did that by using the usermod command and now when I superuser to the user's account and issue a "id", i get the desired gid.
i mean, output of id indicated the user is assigned to the group i want him to be in. ... (5 Replies)
I created a new user for my SUN machine for eg iachasta
1.) added the entry in the /etc/passwd file with corresponding group Id.
2.) The resp group Id was added in /etc/group file.
3.) I made entry in /etc/shadow file also .
i am able to login with user iachasta as
su - iachasta ... (5 Replies)
I need to list files in alphabetical-group and each such group listed in increasing order of timestamp.
Example : If I list files in a directory ( ls -lrt ) it shows like below.
c3
b4
b3
a4
a3
c2
b2
c1
b1
a2
a1
What I need is
c3
c2 (4 Replies)
Hi,
I have forgotten my personal account password but I still have the root access to the box.
Please tell me how can I change my other account password by logging as root.
Thanks.
Rakesh :D (4 Replies)
Here's the issue. Currently when I run passwd -f "username" on any account, when I try to login with said account I don't get prompted to change my password I just keep getting prompted to input a password. (Of course this works just fine with telnet)Is there something i need to add to... (7 Replies)
Hi,
I already gone through with old post regarding listing the group members and tried the command
getenv group other
the result is
other::1:root
i listed my part of the /etc/passwd file below
test1:x:100:1::/home/test1:/bin/sh
test2:x:101:1::/home/test2:/bin/ksh... (7 Replies)
Hi frnds,
I would like to change my default group.
I tried using newgrp, but it will change the group in that xterm only.
If i open a new xterm that setting is gone.
Also i tried by putting newgrp <my_grp> into the file .cshrc which will be run during startup. Eventhough its working, it is... (5 Replies)
I have setup public key based login to my CentOS VPS. I wish to disable direct root login and have created an admin user under wheel group and have modified /etc/sudoers file and gave Wheel group all privileges.
But now I am being prompted for password whenever I type sudo. I do not wish to... (4 Replies)
Dear All,
Some of the users having the same user id and group id in my /etc/passwd file.
Now I want to change the users to have a unique user id and group id.
How can we do that. If I change this will it affect the running applications.
Rgds
Rj (7 Replies)