-   Linux - Newbie (
-   -   write a shell script (

etika 12-11-2010 11:41 AM

write a shell script
write a shell script that allows only user 1 and user 2 to execute a program and only from terminal 01 and terminal 02

crts 12-11-2010 12:01 PM

Please share the script once you have finished writing it. Thanks.

unSpawn 12-11-2010 12:12 PM

Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.

frankbell 12-11-2010 09:57 PM

etika 03-16-2011 09:05 AM

case $LOGNAME in
user1|user2) case`tty` in
*)echo "you cannot use this terminal";exit
*) echo "You are not authorized to use this script";exit;;

All times are GMT -5. The time now is 02:52 PM.