Wednesday, July 17, 2013

arecord (alsa) record required sudo unless its set up right

Linux alsa tools (amixer, aplay, arecord) need access to resources in /dev/ which are not world readable, so your user won’t be able to run those commands without being allocated, in most cases to the audio group.

 

Check /dev/snd the owner is probably root, group is audio

 

See if the user is in the audio group (normally as a secondary)

groups <user>

 

if not

usermod –a –G audio

then logout/in for group change to be applied

 

Ref: (some not good advice, but add context)

http://www.sm5bsz.com/linarch/msg01684.html

http://alsa.opensrc.org/TroubleShooting

 

how to regain root if sudo is lost

Physical access is needed to the host. For GRUB based linux press SHIFT during boot, use the recovery mode and with the most recent kernel, do an fsck to remount the disk as read/write, then drop to a root console.
for raspberry pi the instructions are to use another machine, edit /boot/command.txt as follows
http://rpi.tnet.com/project/faqs/resetpasswd

sudoers broken
privilege escalation
no longer in sudo group
... is not in the sudoers file. This incident will be reported