Lost admin rights solved

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Husse

Re: Lost admin rights

Post by Husse »

This is what you do with users for Virtualbox

Code: Select all

sudo usermod -a -G vboxusers YOUR_LOGIN_NAME
You can find a guide in the howto section of the forum
http://www.linuxmint.com/forum/viewtopi ... =42&t=8453
I'm not quite sure I understand what happened to you, but I think you have lost "the power of sudo"
This is not easy to fix (don't despair) as you need sudo to do it.
Paste the content of /etc/sudoers here so I can figure out what happened - and don't ever try to change that file if you do are not absolutely sure of what you are doing
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Fred

Re: Lost admin rights

Post by Fred »

Use another live cd. I like puppy linux for those kinds of chores but there are many to chose from. then you can edit the offending file and all should be well.

Enjoy

Fred
Husse

Re: Lost admin rights

Post by Husse »

The sudoers file is a very special file. I'm sorry I forgot that you can't even view it if you don't use the right editor.
It might be that I'm tired, but I have to ask, does sudo work for you at all?
Fred

Re: Lost admin rights

Post by Fred »

I just tried it to make sure I was correct. If you will download and burn Puppy linux, (whichever version strikes your fancy), you can modify that file to your hearts content.

You might want to look at my second post on this thread.

http://linuxmint.com/forum/viewtopic.php?f=90&t=8363

Good luck

Fred
Fred

Re: Lost admin rights

Post by Fred »

manda,

Ok, Let me try to help. The version I am using has an icon on the screen, I think it is called "drives." Let me back up.

1. When you first see the Puppy boot splash screen.
Type: puppy pfix=ram and hit enter. This causes puppy to run completely in ram and not touch the hard drive. From there follow the directions until you get the desk top.

2. On my version, (2.16 NOP) you will see an icon on the desk top called, (I think) "drives." If it isn't there on your version look in the menu and find the utility for mounting the drives and partitions.

3. With the mouse, click on the partition that your Mint root directory is in. That should open a window showing all the files and directories in that partition.

4. Look for the etc folder and click on it. Then scroll down the the sudoers file, right click and pick "open as text."

5. Modify the file as you wish and click save. Exit the editor and close all the windows.

6. Unmount the drive partition we have been working with by clicking on it in the same drive utility.

7. Log off puppy and when it asks, tell it not to save anything.

You are done. Be sure and remove the puppy disk from the cd drive and reboot. If you modified the correct file appropriately, all should be well.

Hope this helps,

Fred
Fred

Re: Lost admin rights

Post by Fred »

Interesting, There must be another config file that it is syncing to on boot up. Security in depth kind of thing.

I can't really help you with what files to change, or what to change them to, to completely solve the problem. I just am not familiar enough with the Mint distro. I was only trying to help with the editing process.

I am sure someone else on here can guide you though. I believe Husse is the resident Mint expert, but I am sure there are others too.

Good luck

Fred
Husse

Re: Lost admin rights

Post by Husse »

I wrote
don't ever try to change that file if you are not absolutely sure of what you are doing
This is because you can mess things up completely!
Your sudoers file seems "almost" correct
Below is a correct sudoers file for Daryna
The (somewhat complicated) way to fix it if you can't use sudo at all is to boot in "Recovery mode"
and copy this content into the sudoers file.
First you have to copy the content to a text file, then copy it into the sudoers file using the terminal
I don't go into the details about that as you seem to be able to use sudo
Again never, ever change the sudoers file if don't know exactly what you are doing or, like now, get advice from a reliable source.
Open the sudoers file for editing

Code: Select all

sudo visudo
This is the correct somewhat strange command
The correct sudoers file

Code: Select all


# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults

Defaults        !lecture,tty_tickets,!fqdn

# User privilege specification
root    ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
Husse

Re: Lost admin rights

Post by Husse »

I have to give this a thought.
Could you post your sudoers file - something tells me it's wrong :)
Husse

Re: Lost admin rights

Post by Husse »

Your sudoers file seems to be correct except for the last line
%manda ALL=(ALL) ALL
This is a complicated area, and one that I've not studied in depth as most people don't get problems but I will dig into it.
That line should not make any difference
Husse

Re: Lost admin rights

Post by Husse »

Does this help?
Read carefully
http://www.psychocats.net/ubuntu/sudo
Note that the number after x in /etc/group is not necessarily 106 as in the example
Locked

Return to “Beginner Questions”