title | datePublished | cuid | slug | cover | tags |
---|---|---|---|---|---|
KodeKloud Engineer task: Create a user in Linux |
Thu Apr 18 2024 03:02:44 GMT+0000 (Coordinated Universal Time) |
clv4np32q000g08m83qpw8pst |
kodekloud-engineer-task-create-a-user-in-linux-1 |
linux, task, system-admin, kodekloud, linuxsystemadministration, systemadministration, kodekloudengineer, linux-unix-processes-systemadministration-processmanagement-foregroundprocesses-backgroundprocesses-processtypes-daemonprocesses-terminalcommands-systemresources-operatingsystems |
ssh app_server_username@server_name
# example
ssh tony@stapp01
sudo su
Step 3: Add the asked user, set the user UID as asked, and set the directory where the user will be created
useradd -m user_name -u UID -d directory_path
# example
useradd -m anita -u 1026 -d /var/www/anita
cat /etc/passwd | grep -i user_name
# example
cat /etc/passwd | grep -i anita
Congratulation! you've successfully completed the very first Task!!! 🎉