How to create a Linux User with no Password Login

Where necessary, you may need to have access to a VPS server so you can follow how to implement the steps in this article.  You can get a cheaper VPS Server from Contabo with 4vCPU cores, 8GM RAM, and 32TB Bandwidth for less than $5.50 per month. Get this deal here now

Table of Contents

Cloud VPS S

$5.50 Monthly
  • 4 vCPU Cores | 8GB RAM


$15.50 Monthly
  • 6 vCPU Cores | 16GB RAM


$17.50 Monthly
  • 8 vCPU Cores | 24GB RAM

Creating a Linux user with no password login is generally not recommended for security reasons, as it poses a potential security risk. However, if you have specific requirements or a good reason to do so, you can follow these steps. Keep in mind that this is generally not a best practice and should be used cautiously.

Here’s how you can create a Linux user with no password:

Open a terminal window on your Linux system

Use the sudo command to create a new user. Replace <username> with the desired username.

sudo adduser <username>

During the user creation process, you will be prompted to enter a password. Just press Enter without typing anything, leaving it blank.

Confirm that you want to proceed without a password by pressing Enter again.

Modify the /etc/shadow file

Once the user is created, you need to modify the /etc/shadow file to remove the password hash for the user. Use the sudo command with a text editor (such as nano or vim) to edit the file.

sudo nano /etc/shadow

Find the line corresponding to the user you created (it should be at the end of the file) and remove the password hash field. The line will look something like this:


Delete the characters between the first and second colons (:) to make it:


Save the file and exit the text editor.

Now, the user should be able to log in without a password.

Make the account temporary

I would advise you to keep this account temporary as leaving it running on your server can potentially lead to threat intrusion into your system.

Here is the guide we’ve prepared about how to create a temporary Linux user in Ubuntu

Hire us to handle what you want

Hire us through our Fiverr Profile and leave all the complicated & technical stuff to us. Here are some of the things we can do for you:

  • Website migration, troubleshooting, and maintenance.
  • Server & application deployment, scaling, troubleshooting, and maintenance
  • Deployment of Kubernetes, Docker, Cloudron, Ant Media, Apache, Nginx,  OpenVPN, cPanel, WHMCS, WordPress, and more
  • Everything you need on AWS, IBM Cloud, GCP, Azure, Oracle Cloud, Alibaba Cloud, Linode, Contabo, DigitalOcean, Ionos, Vultr, GoDaddy, HostGator, Namecheap, DreamHost, and more.

We will design, configure, deploy, or troubleshoot anything you want. Starting from $10, we will get your job done in the shortest time possible. Your payment is safe with Fiverr as we will only be paid once your project is completed.