3

Well, I don't know exactly how it happened. But, thing is if I issue a command which I need root priviliges an error message comes that says <user> does not have an entry in sudoers file

I used to work in terminal after issuing sudo bash

Sometime back I installed postgresql using apt-get. It does not start as it takes some temporary (or any other, I'm not sure) as /var/run which postgres user did not have permissions. Well, simply I could have changed that dir to /tmp (which ultimately I did), but before that I played with the things. One of them (I don't remember why) was I tried to add a <user> to postgres group.

Well, that day things went well, but next day (I think after a restart) that <user> could not execute commands with sudo.

Now, I need to install dblink for postgres which I believe needs sudo permissions. Is there anyway to restore sudo permissions to that <user>
Or atleast, is there anyway to install dblink for postgresql without needing sudo thing??

2
  • 2
    Ask Ubuntu!
    – user541686
    May 21, 2011 at 23:09
  • 1
    Please note that although @Mehrdad is correct, and AskUbuntu is a good site. Please do not cross-post there.
    – Wuffers
    May 21, 2011 at 23:18

1 Answer 1

1

Start your unbuntu in maintenance mode. You'll be given root shell.

Issue a visudo command to edit the sudoers files.

Then verify you have

user     ALL=(ALL) ALL

line. Then reboot.

2
  • Thanks for the response. I thought ESC would help in starting ubuntu in maintenance mode. But ESC, DEL, F2 I tried all but did not work. How should I do it.
    – Mayank
    May 22, 2011 at 9:38
  • This is an option in the GRUB. At startup you usually choose your system or the fallback one. You can use e to edit the line. Add single at the end validate and then b to boot. Look it up on google, there is plenty of tutorial for this.
    – M'vy
    May 22, 2011 at 9:46

You must log in to answer this question.

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