[SOLVED] How to RESTORE ROOT PERMISSIONS on my User?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
- ngiampaoli
- Level 1
- Posts: 13
- Joined: Tue Aug 11, 2015 12:17 pm
- Location: Cordoba, Argentina
[SOLVED] How to RESTORE ROOT PERMISSIONS on my User?
Hi all,
In order to activate permissions for Arduino, a friend told me to run this command "sudo usermod -G dialout nicolas" (nicolas is my username)
After I run that command, I lost ROOT permissions for my user.
I checked on internet and the correct command to run should be "sudo usermod -aG dialout nicolas" (my friend forget the "a")
How can I Restore Root Permission for my user?
I don't have the option to enter on recovery mode because Grub does not show the option, it boot directly.
Please, help me.
Thanks in advance.
Nicolas.
Note: At the end you will find my solution
In order to activate permissions for Arduino, a friend told me to run this command "sudo usermod -G dialout nicolas" (nicolas is my username)
After I run that command, I lost ROOT permissions for my user.
I checked on internet and the correct command to run should be "sudo usermod -aG dialout nicolas" (my friend forget the "a")
How can I Restore Root Permission for my user?
I don't have the option to enter on recovery mode because Grub does not show the option, it boot directly.
Please, help me.
Thanks in advance.
Nicolas.
Note: At the end you will find my solution
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How to RESTORE ROOT PERMISSIONS on my User?
which sudo doesn't work?
sudo apt update
gives you what?Re: How to RESTORE ROOT PERMISSIONS on my User?
I think he replaced all of his groups with just the one - dialout. Does your root account have a password? If not, do you have access to a live media USB/DVD?
- ngiampaoli
- Level 1
- Posts: 13
- Joined: Tue Aug 11, 2015 12:17 pm
- Location: Cordoba, Argentina
- ngiampaoli
- Level 1
- Posts: 13
- Joined: Tue Aug 11, 2015 12:17 pm
- Location: Cordoba, Argentina
Re: How to RESTORE ROOT PERMISSIONS on my User?
I don't have root account enabled.ajgringo619 wrote: ⤴Mon Oct 01, 2018 3:22 pm I think he replaced all of his groups with just the one - dialout. Does your root account have a password? If not, do you have access to a live media USB/DVD?
Yes, I have the linux mint usb media to boot from. Can you explain me how to proceed from there?
Re: How to RESTORE ROOT PERMISSIONS on my User?
Code: Select all
su
usermod -aG adm,sudo your_username_here
#
Code: Select all
usermod -aG adm,sudo your_username_here
Code: Select all
linux /boot/vmlinuz- ....... rw init=/bin/bash
- ngiampaoli
- Level 1
- Posts: 13
- Joined: Tue Aug 11, 2015 12:17 pm
- Location: Cordoba, Argentina
Re: How to RESTORE ROOT PERMISSIONS on my User?
After I put su it say autentication failureadministrollaattori wrote: ⤴Mon Oct 01, 2018 4:12 pmCode: Select all
su usermod -aG adm,sudo your_username_here
if I tried
sudo usermod -aG adm,sudo your_username_here it say the user xxx is not allowed to run .....
Re: How to RESTORE ROOT PERMISSIONS on my User?
Try it the 2nd way administrollaattori suggested. That puts you straight in as root, not your user, so should work without permission issues.
ie. Reboot into the grub screen (you may need to hold down shift while booting) and press E when at the selection list.
Find the line that starts with "linux /boot/vmlinuz" etc and after the part that reads "quite splash" insert
"linux /boot/vmlinuz-<...kernel info & some parameters...> quiet splash rw init=/bin/bash <...more parameters...>"
Press F10 to continue booting with the edited line; this should put you straight into a terminal where you can enter the suggested command.
ie. Reboot into the grub screen (you may need to hold down shift while booting) and press E when at the selection list.
Find the line that starts with "linux /boot/vmlinuz" etc and after the part that reads "quite splash" insert
rw init=/bin/bash
so the line now reads something like:"linux /boot/vmlinuz-<...kernel info & some parameters...> quiet splash rw init=/bin/bash <...more parameters...>"
Press F10 to continue booting with the edited line; this should put you straight into a terminal where you can enter the suggested command.
Code: Select all
usermod -aG adm,sudo your_username_here
Re: How to RESTORE ROOT PERMISSIONS on my User?
The easier/safer way to get to a root shell is to reboot, hold shift after the BIOS logo until the GRUB menu appears (sometimes you need to press Esc, too), then select Advanced options and pick the first entry that says Recovery mode, then from the menu that appears choose
That boots you to a root shell, where you can run the usermod command suggested above.
root
. That boots you to a root shell, where you can run the usermod command suggested above.
- ngiampaoli
- Level 1
- Posts: 13
- Joined: Tue Aug 11, 2015 12:17 pm
- Location: Cordoba, Argentina
Re: How to RESTORE ROOT PERMISSIONS on my User?
I solved the problem.
I boot from a live usb image and I edit the file /etc/groups
I add my "username" to groups like root, adm, and others. (I was only on group dialuot)
Tomorrow I will check in other linux wich groups are missing for my user in order to have all running well.
I boot from a live usb image and I edit the file /etc/groups
I add my "username" to groups like root, adm, and others. (I was only on group dialuot)
Tomorrow I will check in other linux wich groups are missing for my user in order to have all running well.
Re: How to RESTORE ROOT PERMISSIONS on my User?
Great to here. On my system (Mint 19), I'm in these groups:
me adm cdrom sudo dip plugdev lpadmin sambashare vboxusers
. I would add yourself to all of these, excepting vboxusers (unless you're running VirtualBox as a host system).