LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 11: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, 02:07 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,048

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
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, 01: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, 06:00 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Summer Midwest USA, Central Illinois, Winter Central Florida
Distribution: SlackwareŽ
Posts: 13,238
Blog Entries: 29

Rep: Reputation: 2437Reputation: 2437Reputation: 2437Reputation: 2437Reputation: 2437Reputation: 2437Reputation: 2437Reputation: 2437Reputation: 2437Reputation: 2437Reputation: 2437
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:20 PM
groups membership paholkiv Linux - Newbie 10 11-12-2011 01:18 PM
centos directory server 8.1 password policy based on group membership tsandholm Linux - Server 1 11-07-2011 12:34 PM
CentOS 5.x Process Sticking to One Core TomBoy123 Linux - Server 2 01-18-2009 01:10 PM
Command 'groups' doesn't show group membership correctly Akhran Debian 1 03-14-2006 07:16 AM

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

All times are GMT -5. The time now is 01:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration