Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've currently booted into recovery mode, because I removed my sole user from admin :/

When I run adduser oadams admin, I get gpasswd: cannot lock /etc/group; try again later.

For what it's worth, ls /etc/ | grep "lock", returns only mtab.fuselock, so there's nothing to delete.

How can I get my user back in the admin group?

share|improve this question
up vote 23 down vote accepted

Check that you are root


Check that the root partition is mounted read-write

cat /proc/mounts

If you see that your partition is mounted as ro (read-only), try remounting it as rw

mount -o remount,rw /
share|improve this answer
I'm root. As for the output of cat /proc/mounts, I get rootfs / rootfs rw 0 0 so I take that that is read-write. There are a bunch of other lines, all with rw in them, except /dev/disk/by-uuid/<some long uuid> / ext4 ro,relatime,user_xattr,acl,barrier=1,data=ordered 0 0, which I take is read-only. – oadams Dec 1 '11 at 22:10
@oadams: see my edit. Please also post /etc/fstab, your drive designation (the uuid one) is atypical. The rootfs system is not important here. – arrange Dec 1 '11 at 22:20
The remount worked, thanks! There isn't enough room here to post the fstab file, but here is (I think) the relevant line: UUID=0c5c5838-0cba-405e-a3ba-ca2555b90469 / ext4 errors=remount-ro,user_xattr 0 1 – oadams Dec 1 '11 at 22:58
Then it's OK. Also check the partition for errors or look at logs/SMART data if your HDD is not failing. – arrange Dec 1 '11 at 23:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.