DropVPS Team
Writer: John hens
How to Create Guest Account on Ubuntu 25.04

Table of Contents
What you will read?
Ubuntu 25.04 doesn’t offer built-in guest sessions by default, but you can still create a separate limited user for temporary or controlled access. A guest account lets someone use your machine without seeing your private data or changing your system settings.
Step 1: Create a limited user
Start by adding a new user account. This account will serve as the guest, with its own home folder and no admin access:
sudo adduser guest user
Set a password when prompted. You can skip the full name and other details by pressing Enter.
Step 2: Revoke admin rights
To ensure the guest user stays restricted, remove it from any privileged groups like sudo:
sudo del user sudo
This prevents the guest from making system-wide changes.
Step 3: Limit access to your files
By default, other users may access your home directory. You can fix this by adjusting permissions:
sudo chmod 750 /home/yourusername
Replace your username with your actual account name. This protects your private files from being read by the guest.
Step 4: Assign a login shell
The guest user needs a shell to use the terminal. You can keep the default shell or assign a different one:
sudo usermod -s /bin/bash guestuser
Later, you can change it to /usr/sbin/nologin to block access completely.
Step 5: Clean up the guest’s files optional
If the guest user is for short-term use, you might want to wipe its files afterward. This is helpful for shared systems:
sudo rm -rf /home/guestuser/*
You can also automate this cleanup with a cron job or a logout script.
Optional Step: Disable GUI login
In some cases, you may want to prevent the guest user from logging in through the graphical interface:
sudo usermod -s /usr/sbin/nologin guestuser
This disables both terminal and desktop login but keeps the user on the system for future use.