Trouble adding sudo name

I am trying to add myself to the sudoers list and I am having problems doing that. When I enter the command "usermod -aG sudo tom" I get the following "usermod: cannot lock /etc/passwd; try again later"

I don't know what that is telling me.

How can I get myself on to the sudoers list?


When you open terminal, first elevate yourself to root with

sudo -i

Enter your password when prompted, then input your commands as before. If this does not work, you may need to remount root directory:

sudo mount -o remount,rw /