You are not logged in.

#1 2013-11-19 10:37:56

stormforce133
Member
From: Argentina
Registered: 2013-11-18
Posts: 14

Permisson denied for SUDO ECHO [SOLVED]

Hi! Today I was trying to remove the speaker bell, and found that I can't do ECHO, here is the example:

[eze@EZE-HP8 ~]$ sudo echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf
bash: /etc/modprobe.d/nobeep.conf: Permiso denegado
[eze@EZE-HP8 ~]$

It seems that my system user groups are a mess... I had problems with user groups this days.. my user was suddenly out of video group, and audio group.
Any ideas?

Thanks

PD: This is my sudoers file

## User privilege specification
##
root ALL=(ALL) ALL
eze ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
# %sudo    ALL=(ALL) ALL

Last edited by stormforce133 (2013-11-19 10:49:08)

Offline

#2 2013-11-19 10:45:02

ijanos
Member
From: Budapest, Hungary
Registered: 2008-03-30
Posts: 443

Re: Permisson denied for SUDO ECHO [SOLVED]

It is beacuse > is not a paramter to echo it tells your shell (bash) to re-route the standard out. You bash runs as your user and doesnt have permissions.

There are multiple solutions to this, if it is a one time thing just run your shell as root (sudo -s or simply sudo bash) and run the command without sudo.

If you need to do this from a script there is some magic with the command tee I don't know the exact syntax, google it if you need it.

EDIT: if you want to edit the /etc/modprobe.d/nobeep.conf file why not run  sudo vim /etc/modprobe.d/nobeep.conf ?

Last edited by ijanos (2013-11-19 10:48:28)

Offline

#3 2013-11-19 10:48:52

stormforce133
Member
From: Argentina
Registered: 2013-11-18
Posts: 14

Re: Permisson denied for SUDO ECHO [SOLVED]

Thank you! That did the trick. There's always something to learn in this forum.

Offline

Board footer

Powered by FluxBB