Linux

Basic Linux A to Z For Devops Engineer How to Manage Users in Linux | Video 06.



“Master Linux user management in this comprehensive tutorial tailored for DevOps engineers! Learn the essential A to Z of Linux commands and techniques to efficiently manage users. Level up your skills with practical insights and streamline your DevOps journey – Dive into Video 06 now!”
Linux में यूजर को कैसे मैनेज करते हैं | सीखिए सीधे औऱ आसान भाषा में.

Commands for practice to you in this video:

#useradd username (create user)
#passwd username (set password to user)
#id username (check out user id, groups id)
#less /etc/passwd (list out all users)
#cat /etc/passwd. (list out all users)
#useradd -s /sbin/nologin username (create user without shell access)
#useradd -m /home/username:/bin/bash (create user with shell access)
#useradd -m -d /opt/username username (create user in specific home directory)
#useradd -u 1500 username (create user with specific user id or UID)
#id -u username (verify, check user’s UID)
#userdel username. (delete user)
#userdel -r username (user remove with his home directory)
#userdel -f username (force to delete user even user logged in)
#usermod -G groupname username (to add user in the new group)
#usermod -g groupname username (to change users default group)
#usermod -m -d /new/location/home/directory (move home folder to new location)
#usermod -L (lock user login)
#usermod -U (unlock user login)
#su username (command to switch user login)
#su – (switch root login))
#less /etc/shadow (files which contains users password & other details)
#chage -l username (view account information)
#chage -M 60 username (set user password expiry to 60 day’s)
#chage -E “2024-05-31″ username (set the account expiry date for user)
chage -I 10 username (inactive account locked after password expired, 10 days)
#passwd -s username (check user account status)

Notes:
1)if you are on $ privilege and getting permission error then you have to switch to root mode using command,
su – (it will of course ask you root password, then you can switch to root mode which is #)
2) Alternatively, you could use sudo command each time when you performing any commands and of course to use this command you should also need root password.
$sudo

“Level up your technical expertise with devopsarticle.com. Access exclusive how to guides and resources for mastering DevOps methodologies.”
Click the link below to visit Devops Article,

[ad_2]

source

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button