I have an embedded system with the root mounted as read only. I want to set up so my sudo users are able without a password change the setting (I plan to use the commands in the login and logout scripts for bash).

I am getting a syntax error on the line (see below) that defines a REMOUNT alias. I can't figure out what that syntax error is. Here is the snippet from the sudoers file

 # Cmnd alias specification
 REMOUNT = /bin/mount -o remount\,rw /,/bin/mount -o remount\,ro /
 # User privilege specification
 root    ALL=(ALL:ALL) ALL

 # Allow members of group sudo to execute any command

What am I doing wrong?

  • Is the keyword Cmnd_Alias missing just before REMOUNT? Feb 4, 2016 at 7:59

1 Answer 1


You forgot to state that it is a command alias:

Cmnd_Alias REMOUNT = /bin/mount -o remount\,rw /,/bin/mount -o remount\,ro /
  • Simultaneous posting as I figured out the answer for myself. Just deleted my answer and ticked yours.
    – akc42
    Feb 4, 2016 at 8:01
  • @akc42 apparently all three of us (including Nicola) figured it out at the same time. :D
    – muru
    Feb 4, 2016 at 8:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .