NetBSD-Users archive

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

Re: How to restrict (audio) device permissions to a group?

On Sun, Nov 13, 2011 at 01:16:07AM +0530, Mayuresh wrote:
> While trying to get audio work on NetBSD I realize the audio device is
> writable to all.
> Can the use of audio device be restricted to a group of users only?
> (I am not really looking for who-ever-logs-in-at-desktop-gets-permissions
> stuff. Just looking for statically defined perbmissions using group
> membership.)

By normal file permissions, applied to the audio devices. In case you have
only one audio device:

chgrp audiogroup /dev/audio0 /dev/audioctl0 /dev/sound0
chmod o-rwx /dev/audio0 /dev/audioctl0 /dev/sound0 
chmod g+rwx /dev/audio0 /dev/audioctl0 /dev/sound0 

where audiogroup is defined in /etc/group 

groupadd audiogroup
vi /etc/group

and add the users you want after tha last : of the line with audiogroup,
seperated by ,


Home | Main Index | Thread Index | Old Index