0

I am trying to add a new user when first installing Ubuntu 18.04 LTS and I get this:

Enter new UNIX username: rob
groupadd: /etc/group.5: lock file already used
groupadd: cannot lock /etc/group; try again later.
adduser: `/usr/sbin/groupadd -g 1000 rob' returned error code 10. Exiting.

It is very similar to this question, however I don't think the problem is precisely the same as I get this right after download and launch. I have been doing everything as the root user and I know this is bad practice.

1 Answers1

3

You did something, as root, that created a lock file, in order to gain exclusive access, but whatever it was didn't release the lock, either because it's still running or it aborted.

Check to see if it's still open:

sudo lsof /etc/group.5

If so, deal with the process that has it open.

If not, simply rm /etc/group.5

In either case, check /etc/group - your last changes may have been lost.

waltinator
  • 36,399