How to prevent audio device change owner after normal session log in
![](https://seccdn.libravatar.org/avatar/7d518627350cee602a61c0807ce78fda.jpg?s=120&d=mm&r=g)
Hi, I have a computer running with SuSe 9.1, KDE desktop. And I connected 2 USB audio headsets to my computer. I found that before user log in, the audio devices (such as /dev/dsp*, /dev/snd/*) owner is root:audio, permission is 660; After one user log in, all the audio device files change owner to $USER:audio, permission change to 600, so another users can't have permission to use the USB headset. How can I prevent it ( keep audio device owner always root, and permission is 660, no matter user login or not)? I know in Fedora Core 2/3 and Mandrake 10.1, it's a configuration file ( /etc/security/console.perms) , which is included in pam RPM, that you can edit to prevent normal session login change audio device owner. I checked my SuSe ( version 9.1), there does have pam-0.77-221 RPM there, but there is no such file (/etc/security/console.perms) included in the RPM. How does SuSe control device owner and permission when normal session log in which are controlled by PAM and console.perms configuration file in other Linux Distribution? Any one can help? Thanks in advance. Rocky Thanks in advance. Rocky
![](https://seccdn.libravatar.org/avatar/72ee3b9e0735cf98a1e936a90fc087ed.jpg?s=120&d=mm&r=g)
On Monday 07 March 2005 19:51, Rocky Zhang wrote:
Hi,
I have a computer running with SuSe 9.1, KDE desktop. And I connected 2 USB audio headsets to my computer. I found that before user log in, the audio devices (such as /dev/dsp*, /dev/snd/*) owner is root:audio, permission is 660; After one user log in, all the audio device files change owner to $USER:audio, permission change to 600, so another users can't have permission to use the USB headset. How can I prevent it ( keep audio device owner always root, and permission is 660, no matter user login or not)?
I know in Fedora Core 2/3 and Mandrake 10.1, it's a configuration file ( /etc/security/console.perms) , which is included in pam RPM, that you can edit to prevent normal session login change audio device owner. I checked my SuSe ( version 9.1), there does have pam-0.77-221 RPM there, but there is no such file (/etc/security/console.perms) included in the RPM. How does SuSe control device owner and permission when normal session log in which are controlled by PAM and console.perms configuration file in other Linux Distribution?
The permissions are controlled by the file /etc/logindevperm where you can control in detail which files get chown()ed, and if you want to stop the chown()ing altogether remove the line "session required pam_devperm.so" from the files /etc/pam.d/xdm and /etc/pam.d/xdm-np
![](https://seccdn.libravatar.org/avatar/7d518627350cee602a61c0807ce78fda.jpg?s=120&d=mm&r=g)
Hi Anders, Yes. It does work! I prefer to modify permission from 0600 to 0660. Thanks. Rocky On Mon, 2005-03-07 at 19:57 +0000, Anders Johansson wrote:
On Monday 07 March 2005 19:51, Rocky Zhang wrote:
Hi,
I have a computer running with SuSe 9.1, KDE desktop. And I connected 2 USB audio headsets to my computer. I found that before user log in, the audio devices (such as /dev/dsp*, /dev/snd/*) owner is root:audio, permission is 660; After one user log in, all the audio device files change owner to $USER:audio, permission change to 600, so another users can't have permission to use the USB headset. How can I prevent it ( keep audio device owner always root, and permission is 660, no matter user login or not)?
I know in Fedora Core 2/3 and Mandrake 10.1, it's a configuration file ( /etc/security/console.perms) , which is included in pam RPM, that you can edit to prevent normal session login change audio device owner. I checked my SuSe ( version 9.1), there does have pam-0.77-221 RPM there, but there is no such file (/etc/security/console.perms) included in the RPM. How does SuSe control device owner and permission when normal session log in which are controlled by PAM and console.perms configuration file in other Linux Distribution?
The permissions are controlled by the file /etc/logindevperm where you can control in detail which files get chown()ed, and if you want to stop the chown()ing altogether remove the line "session required pam_devperm.so" from the files /etc/pam.d/xdm and /etc/pam.d/xdm-np
![](https://seccdn.libravatar.org/avatar/c18a749dda699514c262030be9e0ded9.jpg?s=120&d=mm&r=g)
On Mon, 07 Mar 2005 13:04:34 -0700, Rocky Zhang
Hi Anders,
Yes. It does work! I prefer to modify permission from 0600 to 0660.
Thanks.
Rocky
Hi Rocky, as I can not test it right now, can you share if this solves as well the KDE/arts problem. I.e. does the system sounds for the second user do work after altering these lines. I was looking for solution for this for a long time. Thanks Sunny
![](https://seccdn.libravatar.org/avatar/72ee3b9e0735cf98a1e936a90fc087ed.jpg?s=120&d=mm&r=g)
On Monday 07 March 2005 20:15, Sunny wrote:
Hi Rocky, as I can not test it right now, can you share if this solves as well the KDE/arts problem. I.e. does the system sounds for the second user do work after altering these lines.
I was looking for solution for this for a long time.
If you are using standard KDE or gnome programs for playing sounds, then you should probably look at resmgr instead. That's what governs most authorisation in recent suse versions. How is your second user logging in?
![](https://seccdn.libravatar.org/avatar/c18a749dda699514c262030be9e0ded9.jpg?s=120&d=mm&r=g)
On Mon, 7 Mar 2005 20:19:38 +0000, Anders Johansson
On Monday 07 March 2005 20:15, Sunny wrote:
Hi Rocky, as I can not test it right now, can you share if this solves as well the KDE/arts problem. I.e. does the system sounds for the second user do work after altering these lines.
I was looking for solution for this for a long time.
If you are using standard KDE or gnome programs for playing sounds, then you should probably look at resmgr instead. That's what governs most authorisation in recent suse versions.
How is your second user logging in?
Using "Switch user". I usually lock my desktop with some programs running, and if my wife needs to do something, she just starts a new session without affecting my stuff. But then there was no sound. I had figured out this permission problem (not your solution though), so I have prepared a small script in Autostart to change the permissions back, but it does not made KDE sounds to work. But it helped with XMMS and Skype. Sunny -- Get Firefox http://www.spreadfirefox.com/?q=affiliates&id=10745&t=85
![](https://seccdn.libravatar.org/avatar/72ee3b9e0735cf98a1e936a90fc087ed.jpg?s=120&d=mm&r=g)
On Monday 07 March 2005 20:29, Sunny wrote:
Using "Switch user". I usually lock my desktop with some programs running, and if my wife needs to do something, she just starts a new session without affecting my stuff. But then there was no sound. I had figured out this permission problem (not your solution though), so I have prepared a small script in Autostart to change the permissions back, but it does not made KDE sounds to work. But it helped with XMMS and Skype.
When you use switch user you are logging in on :1, and by default resmgr is only set to give permissions on :0 Have a look at /etc/resmgr.conf. Look for the line allow desktop tty=/dev/tty[1-9]* || tty=tty[1-9]* || tty=:0 and add || tty=:1 at the end and restart resmgr Or perhaps better still (untested) change the last part to tty=:[0-9] that *should* give you resmgr permissions on multiple graphical logins
![](https://seccdn.libravatar.org/avatar/c18a749dda699514c262030be9e0ded9.jpg?s=120&d=mm&r=g)
On Mon, 7 Mar 2005 20:32:57 +0000, Anders Johansson
On Monday 07 March 2005 20:29, Sunny wrote:
Using "Switch user". I usually lock my desktop with some programs running, and if my wife needs to do something, she just starts a new session without affecting my stuff. But then there was no sound. I had figured out this permission problem (not your solution though), so I have prepared a small script in Autostart to change the permissions back, but it does not made KDE sounds to work. But it helped with XMMS and Skype.
When you use switch user you are logging in on :1, and by default resmgr is only set to give permissions on :0
Have a look at /etc/resmgr.conf. Look for the line
allow desktop tty=/dev/tty[1-9]* || tty=tty[1-9]* || tty=:0
and add || tty=:1 at the end and restart resmgr
Or perhaps better still (untested) change the last part to
tty=:[0-9]
that *should* give you resmgr permissions on multiple graphical logins
--
Thanks Anders, I'll try it later at home and will report back. Sunny -- Get Firefox http://www.spreadfirefox.com/?q=affiliates&id=10745&t=85
![](https://seccdn.libravatar.org/avatar/c18a749dda699514c262030be9e0ded9.jpg?s=120&d=mm&r=g)
On Mon, 7 Mar 2005 20:38:37 +0000, Anders Johansson
On Monday 07 March 2005 20:32, Anders Johansson wrote:
Or perhaps better still (untested) change the last part to
tty=:[0-9]
Tested. It works
Good. Thanks. Sunny -- Get Firefox http://www.spreadfirefox.com/?q=affiliates&id=10745&t=85
![](https://seccdn.libravatar.org/avatar/7d518627350cee602a61c0807ce78fda.jpg?s=120&d=mm&r=g)
Hi Sunny, I think it should solve your artsd/sound problem. There maybe another issue: how can you let 2 user launch KDE at same time. 2 options for you: 1) Change audio device lines ( Note: there are bunch of device name related to audio devices, such as audio, sequencer, mixer, snd etc. ) from 0600 to 0660; So after second user login, the user default is in audio group, which should have a R/W permission to access every audio devices; 2) Comment the lines related to audio devices; the audio device (/dev/snd/*) should be always be 0660, owner is root:audio; So the second user should have permission to access the audio device. Thanks. Rocky On Mon, 2005-03-07 at 14:15 -0600, Sunny wrote:
On Mon, 07 Mar 2005 13:04:34 -0700, Rocky Zhang
wrote: Hi Anders,
Yes. It does work! I prefer to modify permission from 0600 to 0660.
Thanks.
Rocky
Hi Rocky, as I can not test it right now, can you share if this solves as well the KDE/arts problem. I.e. does the system sounds for the second user do work after altering these lines.
I was looking for solution for this for a long time.
Thanks Sunny
![](https://seccdn.libravatar.org/avatar/c18a749dda699514c262030be9e0ded9.jpg?s=120&d=mm&r=g)
On Mon, 07 Mar 2005 15:55:45 -0700, Rocky Zhang
Hi Sunny,
I think it should solve your artsd/sound problem. There maybe another issue: how can you let 2 user launch KDE at same time.
Using "switch user" :). Or if your screen saver locks the desktop, in the password prompt there is a button "start new session".
2 options for you:
1) Change audio device lines ( Note: there are bunch of device name related to audio devices, such as audio, sequencer, mixer, snd etc. ) from 0600 to 0660; So after second user login, the user default is in audio group, which should have a R/W permission to access every audio devices;
2) Comment the lines related to audio devices; the audio device (/dev/snd/*) should be always be 0660, owner is root:audio; So the second user should have permission to access the audio device.
Thanks.
Rocky
Yes, I'll try this, as well as what Anders suggests in his other posts. Cheers Sunny -- Get Firefox http://www.spreadfirefox.com/?q=affiliates&id=10745&t=85
participants (3)
-
Anders Johansson
-
Rocky Zhang
-
Sunny