The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 06-13-2005
Just Ice's Avatar
Just Ice Just Ice is offline
Lights on, brain off.
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 627
why not give the "nologin" user ksh as the login shell and put code in $HOME/.profile to check for whether $LOGNAME correspond to the "who am i" output? if yes, exit out ... if no, proceed ... (change $LOGNAME and "who am i" as appropriate for your OS) ...
Code:
ME=$(who am i | awk '{print $1}')
if [ "$LOGNAME" = "$ME" ]
then
    echo "Login not allowed"
    exit
fi
Reply With Quote