<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HelpDesk Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598621#M375644</link>
    <description>Offend....it didn't come out right....I am totally flattered!&lt;BR /&gt;&lt;BR /&gt;Maybe one day I'll share the one I wrote to cleanup some logfiles on Itanium boxes, cause they took out SAM and that quickie logfiles cleanup utility.&lt;BR /&gt;&lt;BR /&gt;Kindest regards,&lt;BR /&gt;Rita</description>
    <pubDate>Wed, 10 Mar 2010 19:21:36 GMT</pubDate>
    <dc:creator>Rita C Workman</dc:creator>
    <dc:date>2010-03-10T19:21:36Z</dc:date>
    <item>
      <title>HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598607#M375630</link>
      <description>I have a helpdesk script (see Below). When I run the script as root ./Helpdesk it will bring up the screen I can select option 4 enter the users name and change the password&lt;BR /&gt;&lt;BR /&gt;When I log in as HelpDesk enter their password it will bring up the screen I select option 4 and here is the message I receive. ANy ideas what I am missing?  Thanks&lt;BR /&gt;&lt;BR /&gt;Username to modify amb0503&lt;BR /&gt;/usr/bin/Helpdesk[92]: sudo:  not found.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Script is for the Help Desk to perform tasks for the sysadmin. These are limited and restricted to the Help Desk only.  &lt;BR /&gt;# Any additional problems or issues, the Help Desk will contact the Sysadms to resolve them. &lt;BR /&gt; #&lt;BR /&gt; #&lt;BR /&gt; ###############################################################&lt;BR /&gt; #!/usr/bin/sh&lt;BR /&gt; #&lt;BR /&gt; #&lt;BR /&gt; #&lt;BR /&gt; set -u&lt;BR /&gt; trap '' INT&lt;BR /&gt; function cont&lt;BR /&gt; {&lt;BR /&gt; print -n "Do You Wish to Continue Y/N : "&lt;BR /&gt; read answ&lt;BR /&gt; if [[ $answ = [Yy] ]]&lt;BR /&gt; then&lt;BR /&gt; return 0&lt;BR /&gt; else&lt;BR /&gt; return 1&lt;BR /&gt; fi&lt;BR /&gt; }&lt;BR /&gt; while true&lt;BR /&gt; do&lt;BR /&gt; clear&lt;BR /&gt; print -n "&lt;BR /&gt; * HELP DESK MENU *&lt;BR /&gt; $(uname -n)&lt;BR /&gt; HELLO: $(whoami)&lt;BR /&gt; ===================================================&lt;BR /&gt;               *************************&lt;BR /&gt;               *  ATI ALLVAC Help Desk *&lt;BR /&gt;               *************************&lt;BR /&gt;          &lt;BR /&gt;&lt;BR /&gt; 1. Display printer status  / print jobs.&lt;BR /&gt;    a. Enter lpstat -p to view all printers &lt;BR /&gt;    b. Enter lpstat -o to view all print request&lt;BR /&gt;&lt;BR /&gt; 2. Cancel a print job.&lt;BR /&gt;&lt;BR /&gt; 3. Cancel ALL print jobs for a printer.&lt;BR /&gt;&lt;BR /&gt; 4. Unlockes and Resets User Passwords&lt;BR /&gt;    NOTE: A number or a group of letters will show on the screen,&lt;BR /&gt;          write down and provide this information to the user.&lt;BR /&gt;&lt;BR /&gt; 5. This will execute the TOP command to look at the high load average on the servers. Monitoring purposes&lt;BR /&gt;    NOTE: Control C breaks the process and returns to the Main Menu&lt;BR /&gt;&lt;BR /&gt; 6. EXIT this program.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ===================================================&lt;BR /&gt;&lt;BR /&gt; Select an Option # from above: "&lt;BR /&gt;&lt;BR /&gt; read answer&lt;BR /&gt; case "$answer" in&lt;BR /&gt; 6*|Qq|bye|Ee ) print "Quitting! See You Later, $(whoami)" ; exit ;;&lt;BR /&gt; 5) if cont&lt;BR /&gt; then&lt;BR /&gt; /usr/bin/top&lt;BR /&gt; fi;;&lt;BR /&gt; 1) if (( $? == 0 ))&lt;BR /&gt; then&lt;BR /&gt; print -n "Enter Printer Name: "&lt;BR /&gt; read prtr&lt;BR /&gt; lpstat $prtr&lt;BR /&gt; print -n "OK to clear screen [Hit Any Key]"&lt;BR /&gt; read h&lt;BR /&gt; fi;;&lt;BR /&gt; 2) if (( $? == 0 ))&lt;BR /&gt; then&lt;BR /&gt; print -n "Enter Printer Name-job#: "&lt;BR /&gt; read prtr&lt;BR /&gt; cancel $prtr&lt;BR /&gt; fi;;&lt;BR /&gt; 4) echo "Username to modify \c"; read USER&lt;BR /&gt; TESTUSER=`awk -v USER=${USER} -F: '$1~USER { print $1 }' /etc/passwd`  &lt;BR /&gt; if test "${USER}" != "${TESTUSER}"&lt;BR /&gt; then&lt;BR /&gt; echo "${USER} is invalid!"&lt;BR /&gt; echo "Press [ENTER] to continue. \c"&lt;BR /&gt; read NOTHING&lt;BR /&gt; else&lt;BR /&gt; #This command looks at the account if it has a password liftime expired it will reset the account and enable it &lt;BR /&gt; sudo /usr/lbin/modprpw -x ${USER}&lt;BR /&gt; sleep 10&lt;BR /&gt; #This command runs the password reset brings up a prompt and 3 choices, selcting 3 is the best for the help desk&lt;BR /&gt; #passwd ${USER}&lt;BR /&gt; fi;; &lt;BR /&gt; 3) if (( $? == 0 ))&lt;BR /&gt; then&lt;BR /&gt; print -n "..Enter printer name :"&lt;BR /&gt; read prtr_name&lt;BR /&gt; print -n "You enter printer ${prtr_name}"&lt;BR /&gt; print -n " Is this correct Y/N "&lt;BR /&gt; read answ&lt;BR /&gt; if [[ "$answ" = [Yy] ]]&lt;BR /&gt; then&lt;BR /&gt; lpstat $prtr_name | grep $prtr_name | sort -k1 | cut -d " " -f1 &amp;gt; $prtr_name.out&lt;BR /&gt; for rem_prt in `cat $prtr_name.out`&lt;BR /&gt; do&lt;BR /&gt; cancel $rem_prt&lt;BR /&gt; done&lt;BR /&gt; else&lt;BR /&gt; echo "No Such Printer"&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; fi;;&lt;BR /&gt; esac&lt;BR /&gt; done &lt;BR /&gt;</description>
      <pubDate>Wed, 10 Mar 2010 17:56:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598607#M375630</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2010-03-10T17:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598608#M375631</link>
      <description>Apparently the script uses the sudo command, which is an add-on product not directly supplied by HP.  It needs to be in the user's path or the full path name of the sudo command should be specified in the script.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 10 Mar 2010 17:59:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598608#M375631</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-03-10T17:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598609#M375632</link>
      <description>Pete &lt;BR /&gt;&lt;BR /&gt;What would be t he easiest way to resolve this? Our new help desk will be using the script and when the log in I would like for them to be able to reset and redo their password. Any help is appreciated&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Mar 2010 18:04:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598609#M375632</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2010-03-10T18:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598610#M375633</link>
      <description>The easiest way would be to change the script.  Check to see where sudo is installed (probably /usr/local/bin) by doing "whence sudo".  That should find it if run by root.  Then edit the script itself and change all occurences of "sudo" to "/usr/local/bin/sudo".&lt;BR /&gt;&lt;BR /&gt;You could also fix their PATH environment variable but that gets a bit more involved.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 10 Mar 2010 18:14:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598610#M375633</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-03-10T18:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598611#M375634</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Regarding the easy way, well, this is a build team or install team or a production team issue.  Sudo can be easily installed during first build.  It can easily be installed over the network now.  Refer to your O/S version and the intenet express bundle for 11.23 and 11.31.&lt;BR /&gt;&lt;BR /&gt;11.23 link&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1123" target="_blank"&gt;https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1123&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Sounds like its a project that you'll have to get approval on.  A good way to start the ball rolling would be to id the servers needing the install.  Do you have access to all?</description>
      <pubDate>Wed, 10 Mar 2010 18:23:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598611#M375634</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2010-03-10T18:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598612#M375635</link>
      <description>Would this be the correct way?&lt;BR /&gt;#This command looks at the account if it has a password liftime expired it will reset the account and enable it&lt;BR /&gt; #sudo /usr/lbin/modprpw -x ${USER}&lt;BR /&gt;  /usr/local/bin/sudo     &lt;BR /&gt;&lt;BR /&gt;I am not an expert at writing scripts</description>
      <pubDate>Wed, 10 Mar 2010 18:23:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598612#M375635</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2010-03-10T18:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598613#M375636</link>
      <description>Oh.  I didn't read this as a PATH environment variable update.  Well, this is easier but still probably a project needing approvals as I doubt the PATH env var will be identical on every box.  So you should build a script to append the PATH var.&lt;BR /&gt;&lt;BR /&gt;export PATH=$PATH:/usr/local/bin/sudo&lt;BR /&gt;&lt;BR /&gt;Test out the above to see if it's what you want.</description>
      <pubDate>Wed, 10 Mar 2010 18:26:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598613#M375636</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2010-03-10T18:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598614#M375637</link>
      <description>I would not be able to do any upgrade, the servers are running applications that if an upgrade was done the applications would not work. I have asked in the past and it was shot down</description>
      <pubDate>Wed, 10 Mar 2010 18:26:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598614#M375637</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2010-03-10T18:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598615#M375638</link>
      <description>I am not sure where you are asking me to input the export Path?&lt;BR /&gt;Would it be in the HelpDesk log in or profile or in  the script &lt;BR /&gt;If in  the script where?&lt;BR /&gt;sorry again I am trying to understand this and learn with your assistance&lt;BR /&gt;Thanks&lt;BR /&gt;-Charlie</description>
      <pubDate>Wed, 10 Mar 2010 18:33:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598615#M375638</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2010-03-10T18:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598616#M375639</link>
      <description>Charles,&lt;BR /&gt;&lt;BR /&gt;The reason I suggested changing the script rather than changing the path is because you first have to figure out how and where the path is being set.  You could append a "export PATH=$PATH:/usr/local/bin" statement to the users login profile, but that's going to depend on which shell they are using and how they are logging in.  &lt;BR /&gt;&lt;BR /&gt;Edit the helpdesk script and change "sudo" to "/usr/local/bin/sudo".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 10 Mar 2010 18:43:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598616#M375639</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-03-10T18:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598617#M375640</link>
      <description>I commented this out &lt;BR /&gt;#sudo /usr/lbin/modprpw -x ${USER}&lt;BR /&gt;&lt;BR /&gt;Added&lt;BR /&gt;/usr/local/bin/sudo /usr/lbin/modprpw -x ${USER}&lt;BR /&gt;&lt;BR /&gt;And it worked just fine. Thanks for all of yor help &lt;BR /&gt;-Charlie</description>
      <pubDate>Wed, 10 Mar 2010 18:54:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598617#M375640</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2010-03-10T18:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598618#M375641</link>
      <description>As you become more experienced in Sysadmin work, one of the habits you should acquire is to always use full path names in your scripts and make sure all your environment variables are defined.&lt;BR /&gt;&lt;BR /&gt;Whoever wrote this script (I'm assuming it wasn't you) should scold herself!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 10 Mar 2010 19:10:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598618#M375641</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-03-10T19:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598619#M375642</link>
      <description>Once you have the correct path for where sudo is installed, put it in the line where sudo is used that you mentioned earlier (in your case 4 stmt...)&lt;BR /&gt;&lt;BR /&gt;...and whoever edited my script needs to go back and fix it; cause he menu is off from commands.  If you're gonna change it - do it right.&lt;BR /&gt;&lt;BR /&gt;Kindest regards,&lt;BR /&gt;Rita</description>
      <pubDate>Wed, 10 Mar 2010 19:10:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598619#M375642</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2010-03-10T19:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598620#M375643</link>
      <description>Rita&lt;BR /&gt;&lt;BR /&gt;Sorry, I am just trying to fix what is there. I did not mean to offend or make anyone angry. The script is awesome and will work for us to do what we need. My apologies &lt;BR /&gt;&lt;BR /&gt;-Charlie</description>
      <pubDate>Wed, 10 Mar 2010 19:14:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598620#M375643</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2010-03-10T19:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598621#M375644</link>
      <description>Offend....it didn't come out right....I am totally flattered!&lt;BR /&gt;&lt;BR /&gt;Maybe one day I'll share the one I wrote to cleanup some logfiles on Itanium boxes, cause they took out SAM and that quickie logfiles cleanup utility.&lt;BR /&gt;&lt;BR /&gt;Kindest regards,&lt;BR /&gt;Rita</description>
      <pubDate>Wed, 10 Mar 2010 19:21:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598621#M375644</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2010-03-10T19:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598622#M375645</link>
      <description>Thanks Rita. I appreciate that. The script keeps me from being woke up in the early AM where the Help Desk folks can log in run the script get the password and send the folks on their merry way.&lt;BR /&gt;&lt;BR /&gt;Again Thank you&lt;BR /&gt;-Charlie</description>
      <pubDate>Wed, 10 Mar 2010 19:28:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598622#M375645</guid>
      <dc:creator>Charles Keyser</dc:creator>
      <dc:date>2010-03-10T19:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598623#M375646</link>
      <description>I didn't use sudo............&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ha ha....&lt;BR /&gt;&lt;BR /&gt;Rita</description>
      <pubDate>Wed, 10 Mar 2010 20:31:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598623#M375646</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2010-03-10T20:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598624#M375647</link>
      <description>OK.............hope this helps you a little.  It's still looking for the path for sudo you need to enter.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Rita&lt;BR /&gt;-------------------------------------------&lt;BR /&gt;&lt;BR /&gt;# Script is for the Help Desk to perform tasks for the sysadmin. These are limited and restricted to the Help Desk only. &lt;BR /&gt;# Any additional problems or issues, the Help Desk will contact the Sysadms to resolve them. &lt;BR /&gt;#&lt;BR /&gt;# Modified: 3/10/10 /rcw To cleanup over appearance of script and put lines in order&lt;BR /&gt;#    To include full path statement on commands&lt;BR /&gt;#&lt;BR /&gt;###############################################################&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;set -u&lt;BR /&gt;trap '' INT&lt;BR /&gt;function cont&lt;BR /&gt;{&lt;BR /&gt;print -n "Do You Wish to Continue Y/N : "&lt;BR /&gt;read answ&lt;BR /&gt;if [[ $answ = [Yy] ]]&lt;BR /&gt;then&lt;BR /&gt;return 0&lt;BR /&gt;else&lt;BR /&gt;return 1&lt;BR /&gt;fi&lt;BR /&gt;}&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;clear&lt;BR /&gt;print -n "&lt;BR /&gt;* HELP DESK MENU *&lt;BR /&gt;$(uname -n)&lt;BR /&gt;HELLO: $(whoami)&lt;BR /&gt;===================================================&lt;BR /&gt;*************************&lt;BR /&gt;* ATI ALLVAC Help Desk *&lt;BR /&gt;*************************&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Display printer status / print jobs.&lt;BR /&gt;1a. To view status one select printer &lt;BR /&gt;1b. To view status on all printers&lt;BR /&gt;&lt;BR /&gt;2. Cancel a print job.&lt;BR /&gt;&lt;BR /&gt;3. Cancel ALL print jobs for a printer.&lt;BR /&gt;&lt;BR /&gt;4. Unlockes and Resets User Passwords&lt;BR /&gt;NOTE: A number or a group of letters will show on the screen,&lt;BR /&gt;write down and provide this information to the user.&lt;BR /&gt;&lt;BR /&gt;5. This will execute the TOP command to look at the high load average on the servers. Monitoring purposes&lt;BR /&gt;NOTE: Control C breaks the process and returns to the Main Menu&lt;BR /&gt;&lt;BR /&gt;6. EXIT this program.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;===================================================&lt;BR /&gt;&lt;BR /&gt;Select an Option # from above: "&lt;BR /&gt;&lt;BR /&gt;read answer&lt;BR /&gt;case "$answer" in&lt;BR /&gt;6*|Qq|bye|Ee ) print "Quitting! See You Later, $(whoami)" ; exit ;;&lt;BR /&gt;5) if cont&lt;BR /&gt;then&lt;BR /&gt;/usr/bin/top&lt;BR /&gt;fi;;&lt;BR /&gt;1a) if (( $? == 0 ))&lt;BR /&gt;then&lt;BR /&gt;print -n "Enter Printer Name: "&lt;BR /&gt;read prtr&lt;BR /&gt;/usr/bin/lpstat $prtr&lt;BR /&gt;print -n "OK to clear screen [Hit Any Key]"&lt;BR /&gt;read h&lt;BR /&gt;fi;;&lt;BR /&gt;1b) if (( $? == 0 ))&lt;BR /&gt;then&lt;BR /&gt;print -n "Status of All Printers"&lt;BR /&gt;sleep 2&lt;BR /&gt;/usr/bin/lpstat -a&lt;BR /&gt;print -n "OK to clear screen [Hit Any Key]"&lt;BR /&gt;read h&lt;BR /&gt;fi;;&lt;BR /&gt;&lt;BR /&gt;2) if (( $? == 0 ))&lt;BR /&gt;then&lt;BR /&gt;print -n "Enter Printer Name-job#: "&lt;BR /&gt;read prtr&lt;BR /&gt;/usr/bin/cancel $prtr&lt;BR /&gt;fi;;&lt;BR /&gt;3) if (( $? == 0 ))&lt;BR /&gt;then&lt;BR /&gt;print -n "..Enter printer name :"&lt;BR /&gt;read prtr_name&lt;BR /&gt;print -n "You enter printer ${prtr_name}"&lt;BR /&gt;print -n " Is this correct Y/N "&lt;BR /&gt;read answ&lt;BR /&gt;if [[ "$answ" = [Yy] ]]&lt;BR /&gt;then&lt;BR /&gt;/usr/bin/lpstat $prtr_name | grep $prtr_name | sort -k1 | cut -d " " -f1 &amp;gt; $prtr_name.out&lt;BR /&gt;for rem_prt in `cat $prtr_name.out`&lt;BR /&gt;do&lt;BR /&gt;/usr/bin/cancel $rem_prt&lt;BR /&gt;done&lt;BR /&gt;else&lt;BR /&gt;echo "No Such Printer"&lt;BR /&gt;fi&lt;BR /&gt;fi;;&lt;BR /&gt;4) echo "Username to modify \c"; read USER&lt;BR /&gt;TESTUSER=`awk -v USER=${USER} -F: '$1~USER { print $1 }' /etc/passwd` &lt;BR /&gt;if test "${USER}" != "${TESTUSER}"&lt;BR /&gt;then&lt;BR /&gt;echo "${USER} is invalid!"&lt;BR /&gt;echo "Press [ENTER] to continue. \c"&lt;BR /&gt;read NOTHING&lt;BR /&gt;else&lt;BR /&gt;#This command looks at the account if it has a password liftime expired it will reset the account and enable it &lt;BR /&gt;&lt;PUT your="" path="" here=""&gt;sudo /usr/lbin/modprpw -x ${USER}&lt;BR /&gt;sleep 10&lt;BR /&gt;#This command runs the password reset brings up a prompt and 3 choices, selcting 3 is the best for the help desk&lt;BR /&gt;#passwd ${USER}&lt;BR /&gt;fi;; &lt;BR /&gt;5) if cont&lt;BR /&gt;then&lt;BR /&gt;/usr/bin/top&lt;BR /&gt;fi;;&lt;BR /&gt;esac&lt;BR /&gt;done &lt;BR /&gt;&lt;/PUT&gt;</description>
      <pubDate>Wed, 10 Mar 2010 20:44:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598624#M375647</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2010-03-10T20:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: HelpDesk Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598625#M375648</link>
      <description>no guarantees....I did it quick &amp;amp; didn't test it.&lt;BR /&gt;&lt;BR /&gt;no points please..</description>
      <pubDate>Wed, 10 Mar 2010 20:45:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/helpdesk-script/m-p/4598625#M375648</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2010-03-10T20:45:28Z</dc:date>
    </item>
  </channel>
</rss>

