#greenwebpage
Explore tagged Tumblr posts
greenwebpage · 1 month ago
Text
How To Add Users in Ubuntu 24.04 LTS
Adding users is a fundamental responsibility of system administrators, crucial for maintaining secure access and efficient resource allocation. Regular users need accounts for their daily operations, and administrators require robust ways to manage these accounts seamlessly. Effective user addition ensures that each user has the appropriate access and permissions for their role.
How To Add Users in Ubuntu 24.04 LTS
Ubuntu 24.04 LTS offers diverse methods for adding users, accommodating various preferences and needs. Whether you prefer the precision of terminal commands, the convenience of a graphical interface, or the efficiency of automation scripts, this guide covers it all. In this comprehensive guide, we will explore multiple methods for adding users in Ubuntu 24.04 LTS, including:
Using the Command Line: Employing powerful commands like adduser and useradd for detailed and controlled user creation.
Using the Graphical User Interface (GUI): Managing user accounts through Ubuntu’s intuitive settings interface.
Adding Users Temporarily: Creating users with expiration dates for specific tasks.
Automating User Creation with Scripts: Streamlining bulk user creation with custom scripts.
Each method is detailed with step-by-step instructions to ensure you can add users effectively and effortlessly, enhancing your Ubuntu experience.
Method 1: Adding a User Using the Command Line
This method is ideal for administrators who prefer using terminal commands.
Using adduser
An easy-to-use, high-level command for adding users is the adduser. It provides a guided process to set up a new user, including setting a password and additional user information.
Step 1: Open the Terminal
To access the terminal, simultaneously depress the Ctrl, Alt, and T keys. Alternatively, search for "Terminal" in your application menu.
Step 2: Add a New User
Execute the following command:
     sudo adduser newuser
Tumblr media
Substitute newuser with your desired username.
The password must be entered when prompted.
Take Note:
Make sure the password satisfies the following requirements:
Minimum of 8 characters.
Includes both upper and lower case letters.
Contains at least one number.
Includes special characters (e.g., !, @, #, $, etc.). 
Tumblr media
Enter the password and press Enter.
Type the password one more time and hit Enter to confirm it.
Some details will be asked while adding a new user like full name, room number, work phone, and home phone.
Tumblr media
Any field can be skipped by pressing Enter.
After entering the information, you will see a summary of the details.
Tumblr media
Confirm the details by typing Y and pressing Enter.
Step 3: Verify User Creation
Execute the below given command to check the new user's addition:
          getent passwd newuser
If the command is successful in creating the user, the user's details will be shown like this:
Tumblr media
Using useradd
A low-level utility for creating new users is the useradd command. It requires more specific options but offers greater control over the user creation process.
Step 1: Open the Terminal
The terminal can be opened by simultaneously holding down the Ctrl, Alt, and T keys.
Step 2: Add a New User
Run the following command, and substitute new_username with the username you prefer:
      sudo useradd -m new_username
Making sure the user's home directory is created is ensured by the -m option.
Step 3: Set Password for the User
The new user can be assigned a password by using:
             sudo passwd new_username
Tumblr media
Type the password one more time and hit Enter to confirm it.
Step 4: Verify User Creation
Execute the below given command to check the new user's addition:
      getent passwd new_username
If the command is successful in creating the user, the user's details will be shown.
Tumblr media
Additional Steps (Optional)
Adding the User to a Specific Group
Use the below given command to add a new user to a certain group:
            sudo usermod -aG groupname newuser
Replace groupname with the desired group (e.g., sudo, admin, docker).
Execute the below given command to check the new user's addition:
       groups new_username
This command will list all the groups that the user belongs to, including the new group.
Tumblr media
Method 2: Adding a User Using GUI (Graphical User Interface)
For those who prefer a graphical interface, Ubuntu provides an easy way to manage users through its settings. Here's a step-by-step guide to adding a new user using the GUI.
Step 1: Open Settings
To access the terminal:
Search for "Settings" in your application menu.
Tumblr media
Step 2: Access Users Section
In the Settings window, go to the search bar at the top and type "Users."
Tumblr media
As an alternative, move to the sidebar's bottom and select "System."
Tumblr media
Click on "Users" from the options available in the System settings.
Step 3: Unlock User Management
Select the "Unlock" button by moving to the upper right corner.
Tumblr media
Enter your administrative password and click "Authenticate."
Step 4: Add New User
Click the "Add User" button.
Input the required data, including your username and name.
You can choose to keep the toggle button inactive by default to designate the new user as a "Standard" user.
Then insert password.
Step 5: Confirm and Apply
Click "Add" to create the user.
Now the new user will appear in the user list.
Take Note
User Management:
Once the user is created, click on the username in the Users section to manage its settings.
Method 3: Adding a User Temporarily
For certain tasks, you might need to add a user that expires after a specified period. This method outlines how to create a user with an expiration date using the command line.
Step 1: Open the Terminal
The terminal can be opened by simultaneously holding down the Ctrl, Alt, and T keys.
Step 2: Add a User with an Expiry Date
Execute the following command: 
            sudo useradd -m -e YYYY-MM-DD temporaryuser
Replace YYYY-MM-DD with the desired expiration date and temporaryuser with your desired username.
Step 3: Set Password for the User
The new user can be assigned a password by using:
               sudo passwd temporaryuser
Enter the password, when prompted.
Type the password and press Enter.
Type the password one more time and hit Enter to confirm it.
Step 4: Verify User
To verify that a temporary user has been created successfully, use the below given command:
        sudo chage -l temporaryUser
Substitute the temporaryuser with the username you want to verify.
Method 4: Automating User Creation with Scripts
The method outlined here demonstrates automating user creation with scripts, particularly useful for bulk user creation tasks. 
Step 1: Open the Terminal
The terminal can be opened by simultaneously holding down the Ctrl, Alt, and T keys.
Step 2: Create a Script
 Any text editor will work for writing the script. Using nano, for instance:
      nano add_users.sh
Step 3: Add Script Content
Add the following content to the script. Modify the usernames and other details as needed.
#!/bin/bash
sudo adduser user1 --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password
echo "user1:password1" | sudo chpasswd
sudo adduser user2 --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password
echo "user2:password2" | sudo chpasswd
Replace user1, user2, etc., with the desired usernames.
Modify the --gecos option to provide additional information about the user (optional).
Replace the password with the desired password.
Adjust the script content as needed, adding more users or customizing user details.
Save and close the file.
Step 4: Make the Script Executable
To enable the script to run, use the chmod command.
              chmod +x add_users.sh
Tumblr media
Step 5: Run the Script
Run the script to create the users.
        ./add_users.sh
Tumblr media
Conclusion:
User management in Ubuntu 24.04 LTS is a critical task for system administrators, providing security, efficient resource allocation, and smooth system operation. With various methods available, from command-line interfaces to graphical user interfaces and automation scripts, Ubuntu 24.04 LTS ensures that adding users can be tailored to different needs and preferences. By following the comprehensive steps outlined in this guide, you can effectively manage regular users.
2 notes · View notes
ananovareviews · 6 years ago
Link
Recent News: Greenwebpage Launch SSD Fast VPS Hosting For Website Owners And Developers
Services Offered: Reseller hosting with SSD storage, unlimited traffic and dedicated IP
Key Selling Points:
Provides affordable high-speed hosting packages
Favorites of WordPress website owners
uses KVM technology
Minimum Package cost: $0.99/mon. and can add Softaculous for 2.00 EUR/month SSD Fast VPS Hosting packages: $6.99/mon.
Target Customers: Personal and Business websites
Support: 24 x 7 by experienced technical consultants, Live Chat Support, Email Support
Uptime Guarantee: 99%
Money Back Guarantee: 30 days
0 notes
greenwebpage · 16 days ago
Text
This guide will help you install Visual Studio Code in Ubuntu 24.04.
https://greenwebpage.com/community/how-to-install-visual-studio-vs-code-on-ubuntu-24-04/
0 notes
greenwebpage · 17 days ago
Text
This guide walks you through installing Python 2, from compiling the source code and setting up pip.
https://greenwebpage.com/community/how-to-install-python-2-on-ubuntu-24-04/
0 notes
greenwebpage · 17 days ago
Text
In today's article, we will demonstrate four methods for configuring a static IP address on Ubuntu 24.04.
0 notes
greenwebpage · 18 days ago
Text
This article will explain the various methods that exist for adding users to the sudoers file so that you do not compromise on the matter of system security.
https://greenwebpage.com/community/how-to-add-users-to-sudoers-on-debian-12/
1 note · View note
greenwebpage · 19 days ago
Text
This post will discuss how to install XFCE on Ubuntu 24.04. XFCE is the default desktop environment of Xubuntu (a well-known distribution of Ubuntu).
https://greenwebpage.com/community/how-to-install-xfce-desktop-on-ubuntu-24-04/
0 notes
greenwebpage · 23 days ago
Text
This guide will help explain how to check and update the Python version on Ubuntu 24.04.
0 notes
greenwebpage · 1 month ago
Text
0 notes
greenwebpage · 1 month ago
Text
0 notes
greenwebpage · 1 month ago
Text
0 notes
greenwebpage · 1 month ago
Text
0 notes
greenwebpage · 1 month ago
Text
0 notes
greenwebpage · 1 month ago
Text
0 notes
ananovareviews · 7 years ago
Text
Web Hosting Review Greenwebpage
Recent News: Greenwebpage Launch SSD Fast VPS Hosting For Website Owners And Developers Services Offered: Reseller hosting with SSD storage, unlimited traffic and dedicated IP Key Selling Points: Provides affordable high-speed hosting packages Favorites of WordPress website owners uses KVM technology Minimum Package cost: $0.99/mon. and can add Softaculous for 2.00 EUR/month SSD Fast VPs Hosting…
View On WordPress
0 notes
ananovareviews · 8 years ago
Text
Greenwebpage Review
http://dlvr.it/NBR3Cc
0 notes