useradd: cannot lock /etc/passwd; try again later. | Can’t add a user in Linux because of this: ‘useradd: cannot lock /etc/passwd; try again later.’ ? Here’s what to check! $ sudo useradd -m -g users -s /bin/bash jsmith useradd: cannot lock /etc/passwd; try again later. If you receive this message even when running with sudo, there are small lock files that are causing
How to create a user in Linux
How to create a user in Linux | How do I create a user in Linux? The old school way is to use the command useradd. Do this command to add user jsmith with a home directory: sudo useradd -d /home/jsmith -s /bin/bash -m jsmith Set the password for user jsmith by then issuing: sudo passwd jsmith It will then prompt you to
