[SATLUG] Fedora 7 - Device Permissions Problems

Sean Carolan scarolan at gmail.com
Tue Jul 24 19:42:23 CDT 2007


>
>
> Sigh.
>
> sudo usermod -G `ls -l /dev/dsp|cut -f4 -d" "` testuser


Bruce, that's an awfully cute one-liner but I'm not keen on adding testuser
to the 'root' group:

[scarolan at kalki ~]$ ls -l /dev/dsp
crw-rw-rw-+ 1 root root 14, 3 2007-07-24 19:00 /dev/dsp

[scarolan at kalki ~]$ sudo usermod -G `ls -l /dev/dsp|cut -f4 -d" "` testuser

[scarolan at kalki ~]$ id testuser
uid=501(testuser) gid=501(testuser) groups=501(testuser),0(root)

Let me explain this more clearly for you.  The useradd command on Red Hat
systems creates a single, private group for each new user.  It does not
place users into secondary groups such as sound, etc. From the fine manual:

DESCRIPTION
       When invoked without the -D option, the useradd command creates a new
       user account using the values specified on the command line and the
       default values from the system. Depending on command line options,
the
       useradd command will update system files and may also create the new
       user's home directory and copy initial files. ***The version provided
with
       Red Hat Linux will create a group for each user added to the system
by
       default.***

There is no sound group on this system.  I won't explain it a third time.


More information about the SATLUG mailing list