LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Please help. Sudo access problem (https://www.linuxquestions.org/questions/ubuntu-63/please-help-sudo-access-problem-502252/)

gneeot 11-16-2006 12:02 PM

Please help. Sudo access problem
 
I've just removed my Ubuntu user from all groups and now I can't use sudo now.
It says: yura@yura:~$ sudo vi /etc/sudoers
yura is not in the sudoers file. This incident will be reported.

I need help ASAP cause I can't access my system.
Thanks in advance

pljvaldez 11-16-2006 12:12 PM

Why did you remove your user from all groups? Doh!

Well, there's a couple things you can do. First I would reboot and select the option "Recovery Mode". If you don't have recovery mode, you'll have to boot with your Live CD and then chroot into your hard drive install.

Then from a command prompt, run visudo and add your user on a line like
Code:

yura ALL= ALL
. Save the file and exit. If you're in recovery mode, type init 2 and you should be presented with the graphical login. Then login and see if you have sudo access...

Also, note that the proper way to edit the sudoers file is to do sudo visudo as a user...

Redeye2 11-16-2006 03:18 PM

If you don't have an "Recovery Mode" entry, you can just add the kernel flag single to boot into single user mode and restore the necessary groups/permissions.

pljvaldez 11-16-2006 03:21 PM

Quote:

Originally Posted by Redeye2
If you don't have an "Recovery Mode" entry, you can just add the kernel flag single to boot into single user mode and restore the necessary groups/permissions.

He'll need info as to how to enter Grub's edit mode and add that flag (since he has no root access). Sorry, but I'm not Grub expert and haven't fiddled much with grub at the command line.

Redeye2 11-16-2006 04:05 PM

When you're booting, select the entry that corresponds to Ubuntu and press E (for edit). Then go to the kernel line and again press E. At the end of the line add single and press Enter to accept the changes. Then press B to boot the system in single user mode.

gneeot 11-17-2006 11:51 AM

Thank you guys for help. I just loaded Linux using recovery grub item and added "yura" to group "admin".

Regards,
Yuriy Padlyak


All times are GMT -5. The time now is 08:24 PM.