Friday, September 17, 2021
One of the most common task you have to do as a Linux administrator is to add a new user. Especially developers who always wants root access. Docker needs root access, however the person who is administering Docker is probably not the system administrator. Most likely it will be the application developer. To accomplish this task you can use the useradd command in the Terminal session then add the new user to the Docker group. Follow the steps below to add a new user to Ubuntu.
1. Switch into the root user using sudo su - command
2. Type the following command useradd -s /bin/bash -d /home/john -m john then press "Enter"
useradd is the command to add a new user to Ubuntu, below is an explaination of what each switch means in the command above
-s --shell SHELL - the login shell of the new account, which is the/bin/bash shell
-d --home-dir HOME_DIR - home directory of the new account, which is /home/john
3. Type ls /home to list the content of the /home directory and you will see the john directory has been created for the user john
4. We've created a new user name john, but he has no password, to set a password for john we can use the passwd command. Type the following command to assign john a password passwd john type in john's password when prompted with Enter new UNIX Password: and confirm the password when prompted with Retype new UNIX password:
5. Even though john has a login, we still don't know what John's full name is to assign a real name to the login john we can use the usermod -c command to assign the login name john a real name
the command above usermod -c "John Wallace" john assigns the name John Wallace to the user name john
Now we can add john to the Docker group
6. First we need to find out if the docker group has been created, type cat /etc/group to look at the list of groups
As you can see the docker group has been created
7, To add john to the docker group type gpasswd -a john docker
Now you will see that john is a part of the docker group
1. Switch into the root user using sudo su - command
2. Type the following command useradd -s /bin/bash -d /home/john -m john then press "Enter"
useradd is the command to add a new user to Ubuntu, below is an explaination of what each switch means in the command above
-s --shell SHELL - the login shell of the new account, which is the/bin/bash shell
-d --home-dir HOME_DIR - home directory of the new account, which is /home/john
3. Type ls /home to list the content of the /home directory and you will see the john directory has been created for the user john
Now we can add john to the Docker group
6. First we need to find out if the docker group has been created, type cat /etc/group to look at the list of groups
As you can see the docker group has been created
7, To add john to the docker group type gpasswd -a john docker
Now you will see that john is a part of the docker group
Posts On Dockers
- Installing Docker On Ubuntu Server
- Installing Docker On CentOS
- Adding Docker Repository Key and Updating Docker To Get The Latest Version
- Docker : Pull The Latest Fedora Image Into A Ubuntu Server
- Docker : Pull The Latest CentOS Image Into A Ubuntu Server
- Docker : Adding Non Root Users To The Docker Group In Ubuntu
- Docker : Adding Non Root Users To The Docker Group In CentOS
- Docker : Command to See What Containers Are Running
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
Thanks for sharing the best content and useful information.
ReplyDeletebritish council ielts coaching in karimnagar
DeleteCheck if Bluetooth is enabled
ReplyDeleteIn the Device Manager, locate the Bluetooth entry and expand the Bluetooth hardware list.
Right-click the Bluetooth adapter in the Bluetooth hardware list.
In the pop-up menu that appears, if the Enable option is available, click that option to enable and turn on Bluetooth.
miracle box keygen