LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-01-2005, 09:46 AM   #1
peter72
Member
 
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196
Blog Entries: 1

Rep: Reputation: 30
after adding user to group


This is a general unix question. After adding a user to a group, other then logging out then back in, how to i get the shell to see it. I've tried opening a new shell, sourceing (in bash and tcsh) .cshrc .bashrc, .login, all with no luck. This shouldn't be that hard.

Thanks,
Pete
 
Old 08-01-2005, 10:02 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
What do you mean get the shell to see it? They should be part of the group. Are you referring to running the command id <username> against it?
 
Old 08-01-2005, 10:17 AM   #3
peter72
Member
 
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Let me try again, here is an example below after added user to cdrom group. Currently in bash.
Code:
user@system$ groups
users
user@system$ cat /etc/group | grep user
users:x:100:user
cdrom:x:1212:user
user@system$ . .bashrc
user@system$ groups
users
user@system$ . /etc/profile
user@system$ groups
users
user@system$ . /etc/bashrc
user@system$ groups
users
<cntr><shift>n    #### open new shell in konsole so rereads env
user@system$ group
users
user@system$ ssh localhost
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
user@localhost's password:
Last login: Mon Aug  1 09:09:30 2005
user@localhost$ group
users cdrom
No matter what shell config I re-source, it doesn't see the group. The only way that I have found was to log out then back in. Or ssh to the same box. I want to not have to do this, specifically, how is the system reading the users groups?

Hope this explains it better.

Pete

Last edited by peter72; 08-01-2005 at 10:18 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding user to group ryancoolest Linux - Newbie 9 04-14-2008 12:50 PM
adding user to wheel group tied2 *BSD 10 09-28-2007 04:22 AM
Adding new group to existing user ALF Linux - Software 7 05-08-2006 09:35 PM
adding user to a group Chilipepa Linux - Newbie 2 09-27-2003 11:08 AM
Adding user account to root group konabumm Linux - Newbie 1 07-31-2003 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration