LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 11-08-2018, 10:30 AM   #1
siggib
LQ Newbie
 
Registered: Nov 2018
Location: Bellevue WA
Distribution: CentOS, Kali, Ubuntu
Posts: 2

Rep: Reputation: Disabled
Question Groups membership not sticking Centos 7


I've ran into something so strange I'm at a loss of even how to explain it so I'm going to demonstrate it
[siggib@localhost ~]$ whoami
siggib
[siggib@localhost ~]$ groups
siggib
[siggib@localhost ~]$ su -
Password:
Last login: Thu Nov 8 08:25:35 PST 2018 on pts/0
[root@localhost ~]# groups siggib
siggib : siggib wheel
[root@localhost ~]# su - siggib
Last login: Thu Nov 8 08:13:53 PST 2018 on pts/0
[siggib@localhost ~]$ whoami
siggib
[siggib@localhost ~]$ groups
siggib wheel
[siggib@localhost ~]$ exit
logout
[root@localhost ~]# exit
logout
[siggib@localhost ~]$ whoami
siggib
[siggib@localhost ~]$ groups
siggib
[siggib@localhost ~]$

Why is the user in the wheel group when viewed from the root account or when root su to it but not when it is just plain?
 
Old 11-08-2018, 01:07 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
It sounds like you didn't log out and log back in after being added to the "wheel" group. Your session acquires its credentials when it starts. Subsequent changes to /etc/groups won't affect it.
 
2 members found this post helpful.
Old 11-09-2018, 12:45 AM   #3
siggib
LQ Newbie
 
Registered: Nov 2018
Location: Bellevue WA
Distribution: CentOS, Kali, Ubuntu
Posts: 2

Original Poster
Rep: Reputation: Disabled
duhhh Thanks, how did I miss that :-(
 
Old 11-10-2018, 05:00 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator Response

Moved: This thread is more suitable in <CentOS> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


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
Why does root belong to any groups in a Centos 5.8 new install? NotionCommotion Linux - Newbie 5 08-08-2012 01:20 PM
groups membership paholkiv Linux - Newbie 10 11-12-2011 12:18 PM
centos directory server 8.1 password policy based on group membership tsandholm Linux - Server 1 11-07-2011 11:34 AM
CentOS 5.x Process Sticking to One Core TomBoy123 Linux - Server 2 01-18-2009 12:10 PM
Command 'groups' doesn't show group membership correctly Akhran Debian 1 03-14-2006 06:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 05:41 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