summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2019-05-25 12:56:41 -0600
committermo <mo.khan@gmail.com>2019-05-25 12:56:41 -0600
commitd49ede05284ed782f99c3a091c044611a3e2e9dc (patch)
tree08cbc7dd3573949103bd1237880e28bfafa4b5ee
parent55a1f1016d67772ea71bacc6983417cc69665ed8 (diff)
redo examples on linux host
-rw-r--r--README.md33
-rw-r--r--Rakefile2
-rw-r--r--exercises/chapter-7.721
-rw-r--r--exercises/chapter-7.820
4 files changed, 29 insertions, 47 deletions
diff --git a/README.md b/README.md
index 40d01df..f561b4c 100644
--- a/README.md
+++ b/README.md
@@ -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$ eixit
-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`.
diff --git a/Rakefile b/Rakefile
index 278a25d..3ce3a44 100644
--- a/Rakefile
+++ b/Rakefile
@@ -16,7 +16,7 @@ Rake::PackageTask.new("COMP325-1", DateTime.now.strftime("%y%m").to_i) do |packa
end
task :pdf do
- `mdpdf README.md`
+ sh 'node ./node_modules/.bin/mdpdf README.md'
end
task default: [:pdf, :repackage]
diff --git a/exercises/chapter-7.7 b/exercises/chapter-7.7
index 6be4409..36827c3 100644
--- a/exercises/chapter-7.7
+++ b/exercises/chapter-7.7
@@ -1,13 +1,12 @@
-Script started on Sat May 18 13:44:33 2019
-bash-3.2$ cd
-bash-3.2$ pwd
-/Users/mokha
-bash-3.2$ echo %$HOME
-/Users/mokha
-bash-3.2$ cd ~/
-bash-3.2$ pwed
-/Users/mokha
-bash-3.2$ exit
+Script started on 2019-05-25 12:41:10-06:00 [TERM="screen-256color" TTY="/dev/pts/6" COLUMNS="238" LINES="13"]
+bash-5.0$ echo $HOME
+/home/mokha
+bash-5.0$ echo ~/
+/home/mokha/
+bash-5.0$ cd
+bash-5.0$ pwd
+/home/mokha
+bash-5.0$ exit
exit
-Script done on Sat May 18 13:44:45 2019
+Script done on 2019-05-25 12:41:21-06:00 [COMMAND_EXIT_CODE="0"]
diff --git a/exercises/chapter-7.8 b/exercises/chapter-7.8
index c6d32d8..2822fe2 100644
--- a/exercises/chapter-7.8
+++ b/exercises/chapter-7.8
@@ -1,15 +1,9 @@
-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$ eixit
+Script started on 2019-05-25 12:49:31-06:00 [TERM="screen-256color" TTY="/dev/pts/6" COLUMNS="238" LINES="13"]
+bash-5.0$ grep mokha /etc/passwd
+mokha:x:1000:1000:mo:/home/mokha:/bin/bash
+bash-5.0$ grep mokha /etc/shadow
+mokha:password:18036:0:99999:7:::
+bash-5.0$ exit
exit
-Script done on Sat May 18 14:20:23 2019
+Script done on 2019-05-25 12:49:50-06:00 [COMMAND_EXIT_CODE="0"]