Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change user's default group on login

Status
Not open for further replies.

daljitsingh

Programmer
Oct 9, 2003
4
GB
When I login to a Solaris 2.8 machine my default group is taken as my primary group from /etc/passwd. Can I automatically override this in any way, e.g. have an entry in my login shell or .cshrc profile ?
I have tried placing "newgrp staff" in my .cshrc file but I get "newgrp: Sorry" when I login and this loops continuosuly.

I know I can manually use the newgrp command but I would like this to be part of the login process.

Thanks in advance
 
Why don't you just change your group in /etc/passwd and /etc/group?
 
Not permitted to do so - its the way my profile is set by our admin folk and we cannot change the primary group assigned !!
 
Is the group staff in the list of groups you belong to?
 
From man newgrp...

DIAGNOSTICS

Sorry Your user ID does not qualify as a group member.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top