johnridley: (antikythera)
[personal profile] johnridley
it's "sudo usermod -aG (groups) user"

Do not forget the "a". Otherwise this group list will REPLACE the old groups.

You don't want to get kicked out of the sudo group, really. But if you do, boot to a live CD, then mkdir /ubuntu, mount (linux root) /ubuntu, chroot /ubuntu, then you can usermod -aG sudo user.

Date: 2009-11-23 04:38 am (UTC)
From: [identity profile] erikvolson.livejournal.com
Ahh, Linux. Needing special tools to edit /etc/group, and forgetting that the "can become root" group is called "wheel".



Date: 2009-11-23 11:59 am (UTC)
From: [identity profile] johnridley.livejournal.com
I could rename "admin" to "wheel" but it's just words. Blame Stallman. Everyone else does.

I have hand edited group before, the commands are just easier. The one they warn you about is hand editing sudoers.

Date: 2009-11-23 04:51 am (UTC)
From: [identity profile] jon787.livejournal.com
On Debian and Ubuntu you can also cheat and use adduser.

adduser USER GROUP

Be careful, on other distros its a symlink to useradd rather than a seperate program.

Date: 2009-11-23 11:58 am (UTC)
From: [identity profile] johnridley.livejournal.com
Thanks. I don't like that, it seems like they're making a command do something other than what it implies it will do, for no good reason other than typing convenience, but it is doc'd. I guess I don't have to use commands I don't like :/

Date: 2009-11-24 07:32 am (UTC)
From: [identity profile] jvanhare.livejournal.com
Heh, this post sounds suspiciously like the voice of experience. Lick yourself out of your own system root did you?

Date: 2009-11-24 11:26 am (UTC)
From: [identity profile] johnridley.livejournal.com
eeh, could be, doc.

Date: 2009-11-25 09:22 pm (UTC)
From: [identity profile] traveller42.livejournal.com
I caught that, but this is where we separate the hackers from the users. He obviously fixed his own mistake.

Date: 2009-11-25 10:34 pm (UTC)
From: [identity profile] johnridley.livejournal.com
Yeah, it wasn't a big deal to fix once I figured out what had happened. It just confused me because at the time that I started having trouble authenticating to do updates in the GUI package manager, I also had a bash window open, and it had cached up my groups and was still letting me sudo.

Today I found another thing I missed; I'd taken myself out of the vbusers group, so VirtualBox wasn't giving me access to the USB devices. The symptom was that the flatbed scanner wasn't running in the virtual XP session, but finding the root cause took about 10 minutes.

June 2025

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 17th, 2025 10:32 am
Powered by Dreamwidth Studios