Lab 10: Linux Remote Service

Goals

Credits

The work is based on labs and exercises from previous offerings of CSCI 363.

Introduction

In this lab you will create a pair of programs that mimic the behavior of Linux login server and client. You will be given a set of source programs as a starting point. One of the programs, login.c asks the user to enter a user name and a corresponding password. The program checks the validity of the user name and password against a given database. If the user name and password matches properly, the program starts a user shell with which the user can do any Linux work. The other two programs are a pair of remote login client and server rshd.c and rshClient.c, some of the functions are implemented in a separate file called rsh.c. This set of programs allow a user to remote log into a server without any authentication. Your task is to try these programs first, then read the programs to understand the process. Finally you will revise the programs such that the remote login server will ask for user name and password for authentication. Only the users with proper credentials can log onto the remote server.

Exercises before Programming

You first do the following to gain some first-hand experiences.

Some Background Information

We describe some basic ideas here. There are three major components in this set of programs.

Your Assignment

You will develop a set of remote login service program using the two existing pairs of programs. The remote login service should check the validity of the user name and password combination. If the user is valid, the program provides a shell service to the remote client. If the user is invalid, the program simply ignores the request and prompt the user for next trial if so chose by the user, just like any Linux systems would do. The user credential files passwd and shadow reside on the server side.

Note that the user name and password sent to the remote server are in plain text. So the service is not secure. In order to make a secure service, we need to use Secure Sockets Layer or SSL protocol, which we will explore later.

When you finish the lab, clean up the directory, submit all files to Gitlab.

Congratulations! You just finished this lab.