You have to write the command by hand. mount -o rw,remount / and be carefull what are you doing because you can screw up your system easily (as root).
–
NikThMay 16 '13 at 14:38

it says, mount: special device remout does not exist. since Ubuntu 12.10, remount menu is not there on recovery mnenu.
–
Jin LinMay 16 '13 at 14:43

There is no remount menu. First boot from advanced options -> Recovery Mode and then select root. There you must give the command I wrote above. Also be careful with the syntax. It seems like you made a mistake with the command
–
NikThMay 16 '13 at 14:50

I've answered your question based on the your wanting to add yourself to sudo. However, I am having difficulty trying to understand what you want to do.
–
octopusgrabbusMay 16 '13 at 15:00

I did the command under etc path. but the file sudoers is still read-only. as there is only root on sudoers path. How do I add my username to sudoers?
–
Jin LinMay 16 '13 at 15:11

2 Answers
2

Sounds like a bit of a predicament you're in. If you've given your root account a password, su may allow you to elevate privileges and add your user to the group "sudo" or "admin".

If not, have you tried running a live CD? You should be able to mount your root partition from the Ubuntu live CD fairly easily, say to /mnt/tmproot/, and add this line somewhere in /mnt/tmproot/etc/sudoers:

If your user name is as an example jlin, you should be able to sudo, if you entered your name as the sudo user when you installed Ubuntu.

If you want to add another user or if your username did not install Ubuntu, then you must log in as that user who installed Ubuntu, enter sudo -i to get root prompt; and then enter this command visudo.

I usually add the users I want to have sudo access. You can also add a group to have sudo access. I prefer just adding the users. I added a space in between the following, so it would format better.