Lesson 12

Date: 6/25/2017
Linux Password Security
Linux System Administration


User password with different encryptions.
Exercise
  • On cryptvm, create user accounts mike1, mike2, mike3, mike4:
    useradd -m -s /bin/bash -d /home/mike1 mike1
    useradd -m -s /bin/bash -d /home/mike2 mike2
    useradd -m -s /bin/bash -d /home/mike3 mike3
    useradd -m -s /bin/bash -d /home/mike4 mike4
    

    By using command mkpasswd on cryptvm create passwords for each user with the different encryption algorithm:
    mkpasswd --method=des mike1
    mkpasswd --method=md5 --salt=b1b2b3b4 mike2
    mkpasswd --method=sha-256 --salt=b1b2b3b4 mike3
    mkpasswd --method=sha-512 --salt=b1b2b3b4 mike4
    

  • Copy the hashes into the user accounts on cryptvm.
    To see thelast 4 the entries in /etc/shadow
    tail -4 /etc/shadow 
    
    They should look as follows:
    mike1:WsjrhMNZ2uDQ6:17343:0:99999:7:::
    mike2:$1$b1b2b3b4$.DXYwTXqggiphS7Cf/1Xs/:17343:0:99999:7:::
    mike3:$5$b1b2b3b4$KR9Cw68GDJqOh8AHoYjzBj0NPBfZqSrK6Ys2Ylw5OL0:17343:0:99999:7:::
    mike4:$6$b1b2b3b4$03/.yg7J/ZdMZk8HdieyVOYKM6S9vToVo1QZyT5j1MZ3PDl4uISxwb.Cq9lHDdgxZHpUxumfe.fYSrDb8m9Al.:17343:0:99999:7:::
    

  • From the desktop, ssh to cryptvm as users mike1, mike2, mike3, mike4 and make sure their passwords work:
    ssh mike1@cryptvm
    ssh mike2@cryptvm
    ssh mike3@cryptvm
    ssh mike4@cryptvm
    



  • Take me to the Course Website