The command
"USERADD <Enter username>"
is the name of the user account you want to create, and [options] are additional parameters you can use to specify various settings for the new user.
Some common options include:
Lets check our work in this file !
Cat /etc/passwd
The cat /etc/passwd command is used to display the content of the /etc/passwd file on Unix-like operating systems, including Linux. This file is a system file that stores information about user accounts on the system
The fields in the /etc/passwd file typically include:
The command
"groupadd <Enter groupname>"
In Linux, the groupadd command is used to create a new group. Groups in Linux are used to organize and manage users with similar access permissions to files, directories, and other resources. The groupadd command allows you to add a new group to the system.
Lets check our work in this file !
Cat /etc/group
Each line in the file represents a separate group and includes several fields separated by colons. The fields typically include:
The command
"usermod -aG <groupname> <User> "
The usermod -aG command in Linux is used to add a user to one or more supplementary groups. Let's break down the options:
The Command
" groupmod -n <oldnname> <newname>
The groupmod -n command in Linux is used to change the name of an existing group.
-n: Specifies the new name for the group.
The command
"groupdel <Group Name> "
The groupdel command in Linux is used to delete a group from the system.
checking under the file
/etc/shadow
if you see "!!" in the password field for a user in the /etc/shadow file, it means that the user account is currently locked, and the user cannot log in with a password. To enable login for that user, you should set a password for the account.
You can do this by using the passwd command. For example, if the locked user is named "username," you can run: sudo passwd username
Mario has "!!" compared to Greg and Mark. Which we see the encrypted password hash.
The Command
Passwd <Enter Username>
The File
vi /etc/sudoers
The sudoers file is a crucial configuration file that determines which users are allowed to run commands as superusers (root) and the specific privileges they have.
Username ALL=(ALL) ALL
Meaning: <the who> allow=(all permission) allow
The placement of entries in the sudoers file is important. The sudoers file uses a specific syntax, and the order of entries can affect how they are interpreted. The entries in the sudoers file consist of rules that define which users are allowed to run specific commands with elevated privileges.
* Make sure to read and understand the file (ALWAYS MAKE A BACK-UP FILE) *
These settings help define password policies, user and group IDs, file creation defaults, and various aspects of user account management on the system.
Admins can customize these defaults based on their security and operational requirements.
The "/etc/skel" directory on Linux is used as a template directory for new user home directories. When a new user account is created, the contents of the "/etc/skel" directory are typically copied into the user's home directory.
This helps to provide a standardized and pre-configured set of files and directories for the new user.
Commands
Chage -E <Date> <Username >
The chage -E command in Linux is used to set or change the expiration date for a user account (expiration date in YYYY-MM-DD format.)
Chage -M <Date> <Username>
The chage -M command in Linux is used to set or change the maximum number of days between password changes for a user.
Chage -W <Date> <Username>
The chage -W command in Linux is used to set or change
1) User Permissions (Owner):
2) Group Permissions:
3) Other Permissions:
For example, a permission string like <rw->(r--){r--} means the <owner> can read and write, the (group) can read, and {others} can read.
Managing permissions is crucial for controlling access to files and maintaining system security. The chmod command is used to change these permission strings in Unix-like systems.
A directory in IT serves as a container for organizing and structuring files and other directories. It provides a systematic way for users to manage and locate data on a computer system.
A file is a collection of information or data stored on a computer. Each file has a unique name and a specific type, like a text document or an image. Files are organized in folders on a computer, and they can be created, opened, edited, and deleted. They can also have attributes like read-only or hidden. Understanding files is basic to using computers because they hold everything from documents to pictures and videos.
Copyright © 2024 Linux Intel - All Rights Reserved.
Powered by GoDaddy
We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.