LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 07-29-2009, 03:46 AM   #1
jackie1
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Rep: Reputation: 0
Smile newgrp: setgid: Operation not permitted?


Hi,

I have an HP workstation with linux redhat3 installed. When I use my personal account to execute "newgrp xxx" ("xxx" is group name pre-defined in system), it always report "newgrp: setgid: Operation not permitted". But we I tried same thing with root account, there's not any problems. Could you give me some help?

Thank you in advance!

Regards,
Jackie
 
Old 07-29-2009, 03:54 AM   #2
mk27
Member
 
Registered: Sep 2008
Distribution: fedora, gentoo, ubuntu
Posts: 148

Rep: Reputation: 23
From the man page:
Quote:
The user will be denied access if the group password is empty and the user is not listed as a member.
That means, if in /etc/group the line for the group looks like this:
Code:
daemon:x:2:root,bin,daemon
"x" is the password field and this one is empty. You must be in the list at the end.
 
Old 07-29-2009, 04:27 AM   #3
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Dear
#gpasswd
command help in setting password for group.
You can also add user to group using 'gpasswd' command.
Thanks
 
Old 08-03-2009, 09:40 PM   #4
jackie1
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks so much for your help!

Is it mean "daemon::2:root,bin,daemon" doesn't need password to change the groups since the "x" was being removed? At same time, "root,bin and daemon" could change groups w/o any problems? Thanks!
 
Old 08-03-2009, 09:43 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
root, bin, daemon are in the daemon group, so no passwd is reqd for them to newgrp to that group.
You must be a member of the group to change to that group
 
Old 08-13-2009, 01:33 AM   #6
jackie1
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for your help! I still have some issue to change the new group.

In my /etc/group, it has such kind of definitions:

beryl:x:501:user1,user2,user3
purple:x:502:user1,user2

my name is user1 while my initial group is "beryl", when i want to switch to "purple" using "newgrp purple" command, it still reports "newgrp: setgid: Operation not permitted". would you think my "/etc/group" definition has some issues?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
setgid: operation not permitted Johnburrell Linux From Scratch 10 03-07-2010 06:03 AM
setgid: Operation not permitted !!! codon Linux - Newbie 1 05-03-2008 07:01 AM
setgid: Operation not permitted codon Linux - Security 2 05-03-2008 07:01 AM
setgid:operation not permitted .. pls help me.. harisankar98 Linux - Newbie 6 12-27-2007 11:45 PM


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