LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-27-2007, 09:44 AM   #16
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65

If you want to use the new group, you can use su to start a new login shell. For example:
Code:
# First I create a user bob (I set the passwd too):
matthew% sudo useradd bob

# Then log in as bob and execute id to see my groups etc.
bob% id
uid=1001(bob) gid=1001(bob) groups=1001(bob)

# In my normal session I add bob to the audio group:
matthew% sudo usermod -aG audio bob

# Back in bob's shell this change isn't seen...
bob% id
uid=1001(bob) gid=1001(bob) groups=1001(bob)

# But I can use su to create a new login shell as a child of the original shell.
# This new login shell will have the new group seting:
bob% su - bob
bob% id
uid=1001(bob) gid=1001(bob) groups=29(audio),1001(bob)

# When bob closes the shell with exit, he goes back to the parent shell, without
# the new group:
bob% exit
bob% id
uid=1001(bob) gid=1001(bob) groups=1001(bob)
The point is that you can use su to temporarily get the new group setting without having to log out and log back in again...
 
Old 05-28-2010, 11:02 PM   #17
secretsharer
LQ Newbie
 
Registered: May 2010
Posts: 1

Rep: Reputation: 0
solution:

sudo chmod 4755 /bin/chgrp
sudo chgrp root /bin/chgrp (just to be safe)

Last edited by secretsharer; 05-28-2010 at 11:17 PM. Reason: security
 
  


Reply

Tags
chgrp



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Operation not permitted jakkals Linux - General 3 09-26-2005 07:30 PM
su - operation not permitted jrtayloriv Linux - Newbie 2 06-09-2005 09:27 PM
How to delete directory/file (operation not permitted)? lvgamer1 Linux - Newbie 4 12-28-2004 10:53 AM
operation not permitted jamaso Slackware 2 05-08-2004 05:55 AM
Operation not permitted FrozenShadow23 Linux - Newbie 6 10-05-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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