From 2290500ca9b8346f65660026ba3bd56afc660bdd Mon Sep 17 00:00:00 2001 From: "dr6784@student.uni-lj.si" Date: Sun, 27 Sep 2015 12:54:03 +0000 Subject: Obe datoteki prestaneta validacijo. Dodana navodila za uporabo nano urejevalnika besedila. git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@334 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/set_motd/howtos/en/index.html | 53 ++++++++++++++++++-------- 1 file changed, 37 insertions(+), 16 deletions(-) (limited to 'kpov_judge/tasks/set_motd/howtos/en/index.html') diff --git a/kpov_judge/tasks/set_motd/howtos/en/index.html b/kpov_judge/tasks/set_motd/howtos/en/index.html index 41c8b19..716c2dd 100644 --- a/kpov_judge/tasks/set_motd/howtos/en/index.html +++ b/kpov_judge/tasks/set_motd/howtos/en/index.html @@ -1,24 +1,45 @@ + + + + set_motd + + + + +

Usage of nano text editor

+

+ 1.) Open the nano editor with the command nano which is followed by the path and name of the file. Example: nano /etc/myfile. If the file doesn't exist, the file will be created by the editor.
+ 2.) To move in the editor, we use the arrow keys, backspace is used for deleting.
+ 3.) To save a file press the combination of keys ctrl + O.
+ 4.) To exit the editor press the combination of keys ctrl + X. The editor will ask you, if you really want to exit, you can answer with y (yes ) or with n ( no ).
+ 5.) To cut a line press the combination of keys ctrl + K.
+ 6.) To paste a line press the combination of keys ctrl + U.
+ 7.) To search over a document press the combination of keys ctrl + W and then enter the search string. +

+ +

How To

-

    -
  1. Create two virtual machines Student(student-console) and Test(SimpleArbiterDhcpGw)
  2. +
      +
    1. Create two virtual machines Student(student-console) and Test(SimpleArbiterDhcpGw)
      no img
    2. Change the network settings to both virtual machines. SimpleArbiterDhcpGw: Adapter 1 set it to NAT, for internet access and Adapter 2 to internal network for local network. - Student: Adapter1 set it to "internal-network" so it is in the same domestic network as SimpleArbiterDhcpGw.


    3. -
    4. Login into Student
    5. -
    6. In Student(student-console) create a new user,as the task demands of you ( eg. marjankoral19 ), with a custom password.
    7. -
    8. In Student(student-console) open interfaces file ( nano /etc/network/interfaces ) and set the IP
    9. -
    10. We can check which interface belongs to which adapter in Virtual-box with MAC address. Run ifconfig command and compare the HWaddr value with the value in the Virtual-box ( settings => network => adapter => Mac address )
    11. -
    12. Then edit the /etc/motd, file with the specified string. (eg. "Not for Human consumption" )
    13. -
    14. For testing login with the test user into Test(SimpleArbiterDhcpGw)
    15. -
    16. Then connect to Student with ssh using the user marjankoral19 - ssh marjankoral@ip.
    17. + Student: Adapter1 set it to "internal-network" so it is in the same domestic network as SimpleArbiterDhcpGw.
      no img
      no img
      no img +
    18. Login into Student
      no img
    19. +
    20. In Student(student-console) create a new user (with "adduser username",as the task demands of you ( eg. marjankoral19 ), with a custom password.
      no img
    21. +
    22. In Student(student-console) open interfaces file ( nano /etc/network/interfaces ) and set the IP
      no img
    23. +
    24. We can check which interface belongs to which adapter in Virtual-box with MAC address. Run ifconfig command and compare the HWaddr value with the value in the Virtual-box ( settings => network => adapter => Mac address )
      no imgno img
    25. +
    26. Then edit the /etc/motd (eg. with nano editor like this: "nano /etc/motd"), file with the specified string. (eg. "Not for Human consumption" )
      no img
    27. +
    28. For testing login with the test user into Test(SimpleArbiterDhcpGw)
      no img
    29. +
    30. Then connect to Student with ssh using the user marjankoral19 - ssh marjankoral@ip.
      no img
    31. If the login was successful, the Message of the day should apear.
    32. -
    33. -
    34. To run Kpov_judge, login onto SimpleArbiterDhcpGw, find and run the file test_task.py ( with ./test_task.py as all other scripts )
    35. -
    36. A window appears as we can see on the image above, then press Enter, enter your username ( eg. dr6784@student.uni-lj.si ), password, task name (eg. 01-preparation-set_motd), enter the string we should get in motd, enter the username and password of a user on Student(student-console)(eg. marjankoral19), the IP of Student(student-console), and after a brief moment we should get the result.
    37. -

-======= +
  • To run Kpov_judge, login onto SimpleArbiterDhcpGw, find and run the file test_task.py ( with ./test_task.py as all other scripts )
    no img
  • +
  • A window appears as we can see on the image above, then press Enter, enter your username ( eg. dr6784@student.uni-lj.si ), password, task name (eg. 01-preparation-set_motd), enter the string we should get in motd, enter the username and password of a user on Student(student-console)(eg. marjankoral19), the IP of Student(student-console), and after a brief moment we should get the result. no img
  • +

    Purpose of the exercise

    How to create user? How to edit a file? How to connect to anoter computer using ssh? How to find out the computer IP address?

    Brief description

    -

    Set up two virtual machines, set MOTD. Connect using ssh.

    \ No newline at end of file +

    Set up two virtual machines, set MOTD. Connect using ssh.

    + + + \ No newline at end of file -- cgit v1.2.1