#!/bin/bash #this part of the script goes in the #bash_profile of the remote $home ## CREATED BY FAHAD SAEED ############################################################################### ######################### remote1 #################################### ############################################################################## #This script is invoked when the user is authenticated via ssh in the #scriptm4(line 43).When the #student logs in his/her home account this script is #invoked and makes sure that the home folder #is exported where the student is currently sitting. # #This sub-script determines the ip from where the last successful ssh was initiated.This info is #then used to export the appropriate folder to that ip. bash /home/script1/loggedip read ipvar>/etc/exports /usr/sbin/exportfs -ra #To reread /etc/exports after editing.