Hey All,
Knucklehead that I am, I somehow neglected to add the '-a' argument to the usermod command when adding myself to another group and now no longer belong to all of the default groups that I was in after installing Stretch with sudo access only.
Would someone here be so kind as to instruct me on now the re-claim my membership in all of the default administrative groups, such as sudo, lpadmin, etc, that one is added to at install time?
Many thanks!
cheers,
john
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Accidentally Removed Myself From All Admin Groups...
Re: Accidentally Removed Myself From All Admin Groups...
Hey Wizard,
Thanks so much for the help!
But (there's always one of these, isn't there), unfortunately, that prompts a couple more questions:
(1) My root partition, and really all partitions other than /boot, are LVM2 logical volumes on a LUKS-encrypted disk partition. Will your process still work?
(2) Since I was advised, strongly iirc, during installation not to set a root account. How would I go back to that original setup?
Thanks again,
john
Thanks so much for the help!
But (there's always one of these, isn't there), unfortunately, that prompts a couple more questions:
(1) My root partition, and really all partitions other than /boot, are LVM2 logical volumes on a LUKS-encrypted disk partition. Will your process still work?
(2) Since I was advised, strongly iirc, during installation not to set a root account. How would I go back to that original setup?
Thanks again,
john
Re: Accidentally Removed Myself From All Admin Groups...
Thanks, wizard, for all of your detailed help!
cheers,
john
ps You too Segway
cheers,
john
ps You too Segway
[Solved]Re: Accidentally Removed Myself From All Admin Group
Hey Wizard,wizard10000 wrote:Can't help you with group membership because I'm not on a Linux box but can tell you how to get root back -
* At the grub menu hit 'e' to edit kernel arguments.
* At the end of the line that starts with "linux", addand hit Esc or F10 to boot.Code: Select all
init=/bin/bash
* Now that we're in single user mode, mount your root filesystem read-write like this:* Change root's password like this:Code: Select all
mount -no remount,rw /
* Reboot and you should be able to use su to get things fixed.Code: Select all
passwd root
Hope this helps -
edit: I can help after all. Thanks to rclone and gdrive I posted my /etc/group to http://paste.debian.net/983731
My username in the file is wizard and I'm a member of all the groups that contain that username - plus the group that *is* my username.
Just a quick followup: Since I the grub2 entry included the appropriate initramfs, which was aware of the LUKS/LVM thing, I followed these directions and accomplished exactly what I was trying to do. And having a template for admin-related default group membership really helped, too. Thanks again!
But there was one minor tweak: Disabling the root password access didn't work by setting it to *empty* using the method you suggested. The passwd command refused to accept it. Instead I had to to use the '-l' passwd option---and I'm still not positive that that accomplishes what I was hoping it would. *Sigh* There's always one more thing...
cheers,
john
Re: Accidentally Removed Myself From All Admin Groups...
Some folks just love doing things the hard way. I can think of even more difficult way to edit user groups, you wanna hear it? It involves chrooting and much more! I guarantee you will be fiddling for hours, that's what you enjoy, right?
Sorry, couldn't help, I'm a big fan of common sense myself.
Sorry, couldn't help, I'm a big fan of common sense myself.
Re: Accidentally Removed Myself From All Admin Groups...
If only there had been a way for you to have impacted that in this case...Segfault wrote:Some folks just love doing things the hard way. I can think of even more difficult way to edit user groups, you wanna hear it? It involves chrooting and much more! I guarantee you will be fiddling for hours, that's what you enjoy, right?
Sorry, couldn't help, I'm a big fan of common sense myself.
Re: Accidentally Removed Myself From All Admin Groups...
Yes, I told you not to mess with root password because it is not necessary. Once booted in single user mode all you had to do was to use a tool like vigr to fix your user account. But of course, no one can help people who do not listen.
Re: Accidentally Removed Myself From All Admin Groups...
Yeah, I tried that, and guess what? It didn't work. To be fair, I used usermod directly since using a tool like vigr would've required me to know something about vi, and to know that such a tool as vigr existed in the first place. When I used usermod, I got complaints from the command with the net assessment being that it didn't update my groups. Go figure; I honestly don't know what state I'd put myself in. So I decided to do it the long way, rebooted su root'd then used usermod with no issues. As I mentioned I then reset the root password.Segfault wrote:Yes, I told you not to mess with root password because it is not necessary. Once booted in single user mode all you had to do was to use a tool like vigr to fix your user account. But of course, no one can help people who do not listen.
I think all of this means that I've now given you free license to feel twice as smug as you originally did, since now you know that it took me twice the effort than you thought it had. You should be thinking about buying me a beer!
john