LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-09-2005, 06:43 PM   #1
Milosevic
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Rep: Reputation: 0
users list in /etc/group


Hi, i'm having some problems to understand the role of the /etc/group file. According to the slackware book, it was supposed to have a list of groups... something like:

cvs::102:chris,logan,david,root // This is just an example

The fields are group name, group password, group ID, and group members, separated by commas. But take a look at the following lines.


milosevic@slackws:~$ id
uid=1000(milosevic) gid=100(users) groups=100(users),11(floppy),17(audio),18(video),19(cdrom)

Now look at the /etc/group file:

root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin,adm
adm::4:root,adm,daemon
tty::5:
disk::6:root,adm
lp::7:lp
mem::8:
kmem::9:
wheel::10:root
floppy::11:
mail::12:mail
news::13:news
uucp::14:uucp
man::15:
audio::17:
video::18:
cdrom::19:
games::20:
slocate::21:
utmp::22:
smmsp::25:smmsp
mysql::27:
rpc::32:
sshd::33:sshd
gdm::42:
shadow::43:
ftp::50:
pop::90op
scanner::93:
nobody::98:nobody
nogroup::99:
users::100:
console::101:


As you can see, the id command tells me i'm in the group floppy, but i'm not. I wanna know why this is going on. Besides, if i change the floppy::11: to
floppy::11:milosevic , i am still not able to mount the floppy drive, why?

Txs.
 
Old 11-09-2005, 06:52 PM   #2
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 47
what's in /etc/fstab for your floppy drive? probably only the owner can mount it.
 
Old 11-09-2005, 07:04 PM   #3
Milosevic
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Original Poster
Rep: Reputation: 0
/dev/fd0 /mnt/floppy auto noauto 0 0
 
Old 11-09-2005, 08:47 PM   #4
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Rep: Reputation: 30
Quote:
Originally posted by Milosevic
/dev/fd0 /mnt/floppy auto noauto 0 0
Add user to the noauto section, i.e. noauto,user and if you want to open it as read/write add rw. Something like this:
Code:
/dev/fd0        /mnt/floppy      auto       noauto,user,rw       0   0
Also the /etc/group file should show you as members of whatever groups you added your username to when you created the user with the -G this,that,other,group. For instance:
Code:
useradd username -m -G floppy,cdrom,audio -s /bin/bash
This will create username the -m will create the home directory and the -G will add the user to the three groups, seperated by commas and no spaces, listed and will specify bash as the shell.

BTW, here is my /etc/group file, edited to just show the groups I'm in:
Code:
sys::3:root,bin,adm,mmyoung,test
disk::6:root,adm,mmyoung,test
wheel::10:root,mmyoung,test
floppy::11:root,mmyoung,test
audio::17:mmyoung,test
video::18:mmyoung,test
cdrom::19:mmyoung,test
games::20:mmyoung,test
users::100:mmyoung,test
HTH,
MMYoung
 
Old 11-10-2005, 12:33 AM   #5
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 581

Rep: Reputation: 38
As a follow on question:
Quote:
uid=1000(milosevic) gid=100(users) groups=100(users),11(floppy),17(audio),18(video),19(cdrom)
How are the extra groups, floppy, audio,video, and cdrom getting assigned to the usedid, becasue they 'aint in /etc/group. I ask because I'm seeing the same behaviour on my box, and I'm interested to know where they're being set.

Cheers,
Eddie
 
Old 11-10-2005, 10:42 AM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Look at /etc/login.defs :
Code:
#
# List of groups to add to the user's supplementary group set
# when logging in on the console (as determined by the CONSOLE
# setting).  Default is none.
#
# Use with caution - it is possible for users to gain permanent
# access to these groups, even when not logged in on the console.
# How to do it is left as an exercise for the reader...
#
CONSOLE_GROUPS      floppy:audio:video:cdrom
 
Old 11-10-2005, 11:30 AM   #7
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 581

Rep: Reputation: 38
Thanks. Always wondered where they came from.

Cheers,
Eddie
 
  


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
number of users in a group cookie_ie Programming 7 03-24-2005 03:43 PM
/etc/group - the group users empty Artanicus Linux - General 2 02-22-2005 04:25 AM
List files owned by user/group guideweb Linux - General 1 09-18-2004 08:18 PM
get users in group hindrik Linux - General 2 08-12-2004 08:05 AM
Users Group datadriven General 2 04-22-2004 01:08 PM

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

All times are GMT -5. The time now is 03:51 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
Open Source Consulting | Domain Registration