diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 33 |
1 files changed, 11 insertions, 22 deletions
@@ -14,42 +14,31 @@ Be sure to complete the final step—click on the Send for Marking button to not 7. Give three commands that you can use to list the absolute pathname of your home directory. ```bash +モ echo $HOME +/home/mokha +モ echo ~/ +/home/mokha モ cd モ pwd -/Users/mokha -モ cd ~/ -モ pwd -/Users/mokha -モ echo $HOME -/Users/mokha +/home/mokha ``` See `exercises/chapter-7.7`. 8. Write down the line in the /etc/passwd file on your system that contains information about your login. What are your login shell, user ID, home directory, and group ID? Does your system contain the encrypted password in the /etc/passwd or /etc/shadow file? -```bash -Script started on Sat May 18 14:19:43 2019 -bash-3.2$ docker run -it fedora /bin/sh
-sh-4.4# useradd -p "password" mo
-sh-4.4# grep mo /etc/passwd
-daemon:x:2:2:daemon:/sbin:/sbin/nologin
-mo:x:1000:1000::/home/mo:/bin/bash
-sh-4.4# grep mo /etc/csh shadow
-daemon:*:17725:0:99999:7:::
-mo:password:18034:0:99999:7:::
-sh-4.4# exit
-exit
-ebash-3.2$ ei[Kxit
-exit
+```text +$ grep mokha /etc/passwd +mokha:x\:1000:1000:mo:/home/mokha:/bin/bash -Script done on Sat May 18 14:20:23 2019 +$ grep mokha /etc/shadow +mokha:password:18036:0:99999:7::: ``` * user id: 1000 * group id: 1000 * `$HOME`: /home/mo -* shell: bash +* shell: /bin/bash * Password is stored in `/etc/shadow` See `exercises/chapter-7.8`. |
