LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-07-2011, 07:44 AM   #1
paholkiv
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Rep: Reputation: Disabled
groups membership


hi
user looses its group's (lp,uucp) membership. At 5th level. Under su kosole, its ok
ssh terminal shows right user's group
 
Old 11-07-2011, 11:30 AM   #2
zootboy
Member
 
Registered: Nov 2008
Location: In a dumpster, with my laptop.
Distribution: Fedora
Posts: 124

Rep: Reputation: 25
OK, first off, welcome to LQ.

Not to be too hard on you (seeing as it is your first day), this kind of question is not one that's likely to get answered. It's:
1. Too general
2. Confusing
3. Poorly written (spelling, grammar and capitalization matter)

So please, to get any help you're going to need to supply some vital information:
- What distro of Linux are you using? Is there anything odd/special/customized about it?
- What are you trying to do? Be specific.
- Where exactly are things going wrong? Post exact error messages.
- What have you tried doing already? The forums should not be the first place you turn to for help.

Hopefully I haven't scared you off. We're actually a welcoming and helpful community. You just have to know how to ask questions.

If you don't know how to do any of the things I've listed, give them a google. But if you're still stuck, ask away.
 
Old 11-08-2011, 03:56 AM   #3
paholkiv
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
- What distro of Linux are you using? Is there anything odd/special/customized about it?
Centos 5.6,
- What are you trying to do? Be specific.
I've added user to lp,uucp groups. But command id or groups shows it is not member of lp,uucp groups. So i cant start some programs using ttyS0, lp.
If I log as root, "id user" shows that it's member of lp,uucp groups.
I tried sopping,reloading nscd service, checked /etc/groups, no way.
English is not my native, so I regret about its poorness.
 
Old 11-08-2011, 11:14 AM   #4
zootboy
Member
 
Registered: Nov 2008
Location: In a dumpster, with my laptop.
Distribution: Fedora
Posts: 124

Rep: Reputation: 25
I'm wondering how you added the user to those groups. If /etc/groups doesn't show the user in those groups, then they aren't in the groups.

Another thing to check is the permissions on /dev/ttyS0 (or whatever you're using). If the group doesn't have permission to read/write it, then you'll have the issue.

Finally, is SELinux enabled? In CentOS, SELinux is usually enabled be default, and can often cause funky issues if not configured properly.
 
Old 11-08-2011, 04:26 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
1. show how you attempted to add user to groups
2. show content of /etc/group
 
Old 11-09-2011, 04:11 AM   #6
paholkiv
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
I added user by gpasswd.
SELinux is disabled.
If I login not in GUI (kde), command groups shows right group's membership.
I

root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon,lp,lv110884lnj
mem:x:8:
kmem:x:9:
wheel:x:10:root
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp,lv110884lnj
man:x:15:
games:x:20:
gopher:x:30:
dip:x:40:
ftp:x:50:
lock:x:54:
nobody:x:99:
users:x:100:
utmp:x:22:
utempter:x:35:
floppy:x:19:
vcsa:x:69:
nscd:x:28:
audio:x:63:gdm
mailnull:x:47:
smmsp:x:51:
rpc:x:32:
screen:x:84:
pcap:x:77:
slocate:x:21:
ntp:x:38:
ecryptfs:x:101:
dbus:x:81:
avahi:x:70:
xfs:x:43:
hsqldb:x:96:
sshd:x:74:
haldaemon:x:68:
gdm:x:42:
rpcuser:x:29:
nfsnobody:x:65534:
avahi-autoipd:x:102:
sabayon:x:86:
pulse:x:103:
pulse-rt:x:104:
pulse-access:x:105:
mysql:x:106:

]

Last edited by paholkiv; 11-09-2011 at 04:14 AM.
 
Old 11-09-2011, 07:33 AM   #7
zootboy
Member
 
Registered: Nov 2008
Location: In a dumpster, with my laptop.
Distribution: Fedora
Posts: 124

Rep: Reputation: 25
Are you saying that if you run "id" in a terminal emulator within X (e.g. Konsole), it doesn't show your groups, but if you run it in runlevel 3 (regular tty) as the same user, it does? Because if so, that's just weird.

But that group file seems to be in order. So now we need to check the permissions on ttyS0 (or whatever you're trying to use). Try running "ls -al /dev/ttyS*" and post that.
 
Old 11-09-2011, 10:02 AM   #8
paholkiv
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zootboy View Post
Are you saying that if you run "id" in a terminal emulator within X (e.g. Konsole), it doesn't show your groups, but if you run it in runlevel 3 (regular tty) as the same user, it does? Because if so, that's just weird.
.
yes, i meant that. If I run terminal emulator as root, "id user" shows right groups.
 
Old 11-09-2011, 01:58 PM   #9
zootboy
Member
 
Registered: Nov 2008
Location: In a dumpster, with my laptop.
Distribution: Fedora
Posts: 124

Rep: Reputation: 25
Did you possibly modify the permissions of the /etc/group file? I'm just guessing here, but if it isn't world readable, you'd get that issue (and a lot of other problems).

Run "stat /etc/group" and post the result.
 
Old 11-10-2011, 07:05 AM   #10
paholkiv
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
I post 'stat' result:

[root@lvx3-00111 ~]# stat /etc/group
File: `/etc/group'
Size: 736 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 1312873 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2011-11-10 13:50:47.000000000 +0200
Modify: 2011-11-03 19:05:57.000000000 +0200
Change: 2011-11-03 19:05:57.000000000 +0200

I've guessed maybe some caching of groups membership queries presents?
I tried to stop nscd service and turned off Administration-Authentication-Options-Cache User Informaion.
Issue hasn't disappeared.
 
Old 11-12-2011, 01:18 PM   #11
zootboy
Member
 
Registered: Nov 2008
Location: In a dumpster, with my laptop.
Distribution: Fedora
Posts: 124

Rep: Reputation: 25
OK, that looks right.

How about this. Try running "newgrp lp" (or whatever group you're trying to use), then run the command that's giving you trouble. This should force your terminal to use the specified group as your user's primary group (for the session).
 
  


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
[SOLVED] LFS /tools/bin/groups not displaying supplementary groups grail Linux - Newbie 8 06-09-2010 10:57 PM
Micro$oft AD Groups to Debian Lenny Groups.- Mindblower Linux - Desktop 0 04-22-2009 10:28 AM
Map Windows NT Groups to UNIX Groups - why? kenji1903 Linux - Networking 4 10-16-2007 12:52 PM
Command 'groups' doesn't show group membership correctly Akhran Debian 1 03-14-2006 07:16 AM
winbind: wbinfo -g only lists global groups from PDC and not local groups saradiya Linux - Networking 0 12-01-2003 03:58 AM


All times are GMT -5. The time now is 08:26 AM.

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