Logo

dev-resources.site

for different kinds of informations.

How To Create A New User And Assign Super User Privileges On Your Ubuntu Server

Published at
12/5/2024
Categories
webdev
devops
ubuntu
terminal
Author
nolimithendrix
Categories
4 categories in total
webdev
open
devops
open
ubuntu
open
terminal
open
Author
14 person written this
nolimithendrix
open
How To Create A New User And Assign Super User Privileges On Your Ubuntu Server

Whether you are a seasoned developer or a DevOps engineer, setting up a dedicated Ubuntu server is a common task when working with Infrastructure as a Service (IaaS) providers. One of the first things you'll need to do is create a new user and grant them superuser privileges. This guide will walk you through the process seamlessly. Before we proceed, ensure that you have already connected to your remote server via SSH.

Creating a New User

To begin, you will need to create a new user. This process is straightforward:

  1. Open your terminal.
  2. Execute the following command:
   sudo adduser [user_name]
Enter fullscreen mode Exit fullscreen mode

Replace [user_name] with your desired username. During this process, the system will prompt you to enter a password and other details such as the full name, room number, and more. Ensure you choose a strong password to maintain server security.


Assigning Superuser Privileges

Once the new user is created, the next step is to grant them superuser privileges. This will allow the user to perform administrative tasks using the sudo command.

  1. Run the following command:
   sudo usermod -aG sudo [user_name]
Enter fullscreen mode Exit fullscreen mode

Again, replace [user_name] with the username you set up previously. This command adds the new user to the sudo group, enabling them to execute commands with elevated privileges.

And that's itβ€”in just a few commands, you have successfully created a new user with superuser privileges on your Ubuntu server. This configuration will empower the user to perform critical tasks while maintaining a secure environment.

Feel free to share your thoughts and experiences. If you want to learn more about similar topics, don't hesitate to check out my other work.


More about the author here.
Cover photo by Tima Miroshnichenko.

terminal Article's
30 articles in total
Favicon
forms in the terminal w/ JavaScript? if you love Terminal UI's check this out!
Favicon
Enhance Your macOS Terminal with Oh My Zsh, Autosuggestions, and Powerlevel10k
Favicon
My Zig with Ghostty
Favicon
Was able to get my terminal looking nice thanks to this post!
Favicon
vim_notes
Favicon
From iTerm To WezTerm
Favicon
kkTerminal β€”β€” A terminal for Web SSH connection
Favicon
How to Change the Background in Ubuntu Terminal
Favicon
Go + Ubuntu: Old School Style
Favicon
The Dotfiles Quest: Becoming a Configuration Wizard πŸ§™β€β™‚οΈ
Favicon
The Future of Rust Programming and My Experience with Rust-Based Tools
Favicon
πŸŽ‰ LazyVim Adventure Part 2: Managing Projects Like a Boss! πŸŽ‰
Favicon
I made wut – a CLI that explains your last command with an LLM
Favicon
Mastering VIM: A Complete Beginner's Guide to the Command-Line Editor
Favicon
Clean Your Linux Device
Favicon
How To Create A New User And Assign Super User Privileges On Your Ubuntu Server
Favicon
Superfile: A Comprehensive Guide to Streamlined File Management in the Terminal
Favicon
Terminal Animations with Node.js
Favicon
Oh My Zsh: A Simple Guide for Developers
Favicon
How to Search Through Multiple Files for Specific Data Using Grep
Favicon
Comandos Essenciais do Linux (Nv-2)
Favicon
17 Essential CLI Tools to Boost Developer Productivity
Favicon
How to Increase the Scrollback Buffer in VSCode Terminal
Favicon
Comandos Essenciais do Linux (Nv-1)
Favicon
How to change the Ubuntu password from the terminal
Favicon
Ghostty 1.0: A Terminal Emulator Built for Speed, Features, and Native Integration
Favicon
can any one telll me where to find step by step instructiom\n on how to install unrealk engine on ubuntu with sudo . . . .fyi i've never ran a terminal new to this
Favicon
Enhance Your Sublime Text and Terminus with Elegant Aesthetic Looks
Favicon
Warp AI Terminal: A Beginner’s Guide to the Future of Command Line Interfaces
Favicon
Ultimate LazyVim Terminal Troubleshooting Tutorial (for the Brave Souls πŸ› οΈ)

Featured ones: