LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   write a shell script (https://www.linuxquestions.org/questions/linux-newbie-8/write-a-shell-script-849649/)

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

Great!
 
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

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

etika 03-16-2011 09:05 AM

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


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