[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: adding a user to a group



xucaen@yahoo.com wrote:

Hi, How do I add a user (myself) to the group that can access the CD-ROM and CD-RW drives?
I am unfamiliar with how to do this. I read the adduser man page and it does say that it
can add a user to a group, but I don't know what the groups are for CD-ROM and CD-RW.

Thanks!

Jim


Assuming your CD-ROM drive is on /dev/cdrom:

EnJaeLove[westk]:/home/westk> ls -l /dev/cdrom
lrwxrwxrwx    1 root     root            3 Aug 11  2001 /dev/cdrom -> hdc

So now I look at /dev/hdc.

EnJaeLove[westk]:/home/westk> ls -l /dev/hdc brw-rw---- 1 root disk 22, 0 May 12 2001 /dev/hdc

So, to have read/write access to the CDROM drive, I'd need to be in the "disk" group. However, looking quickly at the permissions on the hard drive at /dev/hda:

EnJaeLove[westk]:/home/westk> ls -l /dev/hda
brw-rw----    1 root     disk       3,   0 May 12  2001 /dev/hda

which means that if I put this user into the "disk" group, he'll have direct read/write access to the raw hard drive device. Hmm, do I really want to do that? If that's not an issue, just add the user to the "disk: group. This can be done manually by editing "/etc/group", by modifying the line:

disk:x:6:

to something like:

disk:x:6:westk

or it can be done with the "adduser" or "addgroup" command. I never use the "adduser" command for this, so I won't discuss it. To add the user "west" to the group "disk", you'd issue a command like:

addgroup westk disk

That user, "west", would need to log out (if he's currently logged in), and then log back in before the changes take effect. He can run the command "groups" to see what groups he's a member of.


--
Kent West (westk@acu.edu)
====
Windows: Where do you want to go today?
MacOS: Where do you want to be tomorrow?
Linux: Are you coming or what?






Reply to: