login programme
时间:2006-03-13 来源:苏恒
vi login
clear
echo "Now the Haifeng Linux world is just for you"
echo -e "The last time you login Date and Time:\c"
date
echo "login,please enter the username"
echo -e "username:\c"
read answer
if test "$answer" = suheng
then
echo "Welecome to enter the Liunx world, suheng!"
echo -e "Now Date and Time:\c"
date
echo -e "Number of users on the system:\c"
who |wc -l
echo -e "Your current directory:\c"
pwd
echo "have a Good time!"
else
echo "You don't have the right to login in this server!"
echo "You can try to use the currenty username to login later."
echo "System is locked,please wait for 20 second"
echo "The system is reboot ..."
sleep 20;clear
sh login
fi
#Save the file as login ,then run sh login ,you can see the result.
#The programme passed in Ubuntu linux.
clear
echo "Now the Haifeng Linux world is just for you"
echo -e "The last time you login Date and Time:\c"
date
echo "login,please enter the username"
echo -e "username:\c"
read answer
if test "$answer" = suheng
then
echo "Welecome to enter the Liunx world, suheng!"
echo -e "Now Date and Time:\c"
date
echo -e "Number of users on the system:\c"
who |wc -l
echo -e "Your current directory:\c"
pwd
echo "have a Good time!"
else
echo "You don't have the right to login in this server!"
echo "You can try to use the currenty username to login later."
echo "System is locked,please wait for 20 second"
echo "The system is reboot ..."
sleep 20;clear
sh login
fi
#Save the file as login ,then run sh login ,you can see the result.
#The programme passed in Ubuntu linux.
相关阅读 更多 +










