changing file ownership /dev/dsp (doesnt work..)
HI,
I've got my sound working but it only works when I'm logged in as root and start xwindows(KDE3) There was a recommendation to change the dsp sound device to a 'audio' group and then let users be members of that group to simplify administration and security. So i created the group audio added my user to that group Then... I changed the /dev/dsp to belong to the audio group 'bash-2.05a$ ls -l dsp crwxrwx--- 1 1002 audio 14, 3 Jul 18 1994 dsp' But when i login as my user that is under the audio group i still get the same dern error message! "device /dev/dsp can't be opened permission denied. If i'm logged in as root I don't get this and the sound very well :) What i'm i missing? Alex |
When you are logged as user and type "groups", does the output shows you audio group???
|
Hmmm. Interesting command, thanks. Good thinking it doesn't show audio as one of my
groups, which is strange. 'bash-2.05a$ groups users bash-2.05a$' I used the utlitiy called 'KDE User management' in KDE3 to create the audio group and to add my user to that group. I went and checked again and my users is in the audio group but it says "primary group = users " I wonder if that is causing a problem, or maybe it is because I used the KDE user management and it didnt work right. Here is the groups file from the system, (edited) root::0:root sys::3:root,bin,adm adm::4:root,adm,daemon tty::5: disk::6:root,adm lwheel::10:root gdm::42: nobody::98:nobody nogroup::99: users::100:icy console:x:101: audio:*:1001:icy |
Why not just do this as root
chmod a+rw /dev/dsp /dev/mixer /dev/midi /dev/sequencer now all sound works no matter what user you are. |
chmod a+rw /dev/dsp
Works but i'd still like to figure out why its not working unless my user icy has permissions outside of him being in group audio which has permission also. Also i've remove the read write permission for ALL to dsp making crwxrwx--- 1 1002 users 14, 3 Jul 18 1994 dsp And then I changed did chgrp on dsp 'chgrp users dsp' And then my user could access /dev/dsp because he is a member of the users group. Anyone have an idea why my 'audio' group which owned /dev/dsp at one time doesn't work. The user icy was a member of the audio group. Alex |
Hi icehenge,
It's normal if you can't access /dev/dsp... Nonetheless everything is well configured ;). In fact when you try to access /dev/dsp it's with GID 100 (users one) if you don't believe me type: Code:
[olivier@Olinux-lfs ~]$ id Code:
[olivier@Olinux-lfs ~]$ newgrp audio Of course there's another solution :p a bit less secure, but it's a good alternative. Edit /etc/login.defs file and enable this option: Code:
# Use with caution - it is possible for users to gain permanent A last advice, have a look at gpasswd command (and his man page)... It may be very helpful, to set or not passord for groups... Oliv' |
Oliv'
Thank you! That was exactly the type of explanation I was looking for on why my group audio was not working. I haven't tried the 'newgrp audio' command but it sounds like a more secure but tiresome route to follow. My slackware system is only used for home use. The only service I plan to run is SSH and this system is located behind a hardware firewall so I 'suppose' its less likely to be targeted and attacked but I love security so thats why i'm going through all this trouble :) How do you have the audio setup on your system? Alex |
I forgot to tell you one command, that's:
Code:
sg audio -c command Another reason is that the more secure a system is, the less friendly user it is ;) For example, have a look at IPCOP distro, that's very secure(even if they can do better), but you don't have compiler or other usefull things;) Hope this help you Oliv' |
Oliv'
Thanks for the help, I'm just starting using linux and your assistance along with everyone else on this board is greatly appreciated. Without this type of assistance some troubles might have gotten the better of me. Be well. Alex |
All times are GMT -5. The time now is 09:11 AM. |