Thursday, September 16, 2021
In the previous post we created a user called "John Wallace", in this post we are going to add John and Jason into the developers group. In any system you want to group users into groups so that you can easily assign constraints and privileges to a group of user instead of doing it one at a time.
To create a group call developers type in the following command:
Similar Posts:
To create a group call developers type in the following command:
- su to get root access
- groupadd developers to add the group developers
3. Now we want to assign John and Jason to the developers group, with this command useradd john -G developers and repeat the command with jason
As you can see we used the usermod command instead of the useradd command because john, and jason already exists.
4. Now let's assign a group to the user on creation using the useradd command useradd -s /bin/bash -d /home/dora -m dora -G developers
In the command above we added a new user called dora and assigned her to developers group at the same time. The -G option indicates that we want to assign a default group to the user.
5. Now to verify we are going to list the members of the developers group with this command grep 'developers' /etc/group this command searches for entry for the developers group in the /etc/group file
6. Now let's say John is a bad developer and always brings down the server with his infinite loops. We can use this command to remove John from the developers group gpasswd -d john developers
Similar Posts:
- Linux CentOS In-Depth: Adding A New User With useradd and usermod Command
- Linux: Switching To root User With The sudo Command On Ubuntu Server
- Linux: Find Out Which Shell You Are Using
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 a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. Apache Kafka
ReplyDelete