Last active
September 3, 2019 13:34
-
-
Save catharsis96/35e41c7b14d8d555ce6982ca61c4f0e5 to your computer and use it in GitHub Desktop.
How to create a new user in Linux. Code to insert after "$" symbol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mami@mami:~$ sudo useradd testinguser | |
mami@mami:~$ sudo passwd testinguser | |
Enter new UNIX password: | |
Retype new UNIX password: | |
passwd: password updated successfully | |
mami@mami:~$ sudo ls -l /home | |
total 20 | |
drwxr-xr-x 55 alaa alaa 4096 Aug 22 22:00 alaa | |
drwx------ 2 root root 16384 Jun 5 09:46 lost+found | |
mami@mami:~$ sudo mkdir /home/testinguser | |
mami@mami:~$ sudo chown testinguser:testinguser /home/testinguser | |
mami@mami:~$ ls -l /home | |
total 24 | |
drwxr-xr-x 55 alaa alaa 4096 Aug 22 22:00 alaa | |
drwx------ 2 root root 16384 Jun 5 09:46 lost+found | |
drwxr-xr-x 2 testinguser testinguser 4096 Aug 23 10:03 testinguser | |
mami@mami:~$ ls -l /home/testinguser/ | |
total 0 | |
mami@mami:~$ sudo chsh -s /biKn/bash testinguser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment