<?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: How to write a special shell menu ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539299#M222923</link>
    <description>The best way to do this is to make your menu script their default shell in /etc/passwd.&lt;BR /&gt;&lt;BR /&gt;The users password entry might look something like&lt;BR /&gt;&lt;BR /&gt;user1:password:555:444::/home/user1:/usr/local/bin/menu&lt;BR /&gt;</description>
    <pubDate>Fri, 06 May 2005 08:30:20 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2005-05-06T08:30:20Z</dc:date>
    <item>
      <title>How to write a special shell menu ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539295#M222919</link>
      <description>I have a handheld device which can telnet to our Unix/Linux servers to run an application, it has a full functional keyboard with all keys.&lt;BR /&gt;I need to force all users who login to the servers via such device to run a shell script right after they login, without prompting the commandline, like this:&lt;BR /&gt;&lt;BR /&gt;************************&lt;BR /&gt;1.  Run Application&lt;BR /&gt;2.  Change Password&lt;BR /&gt;3.  Logout&lt;BR /&gt;************************&lt;BR /&gt;&lt;BR /&gt;I need to restrict all users to access only the options above, they should not be able to do anything else except the actions above.&lt;BR /&gt;How to prevent them from using "Ctrl + C" or something else to break the shell and going into the Prompt. That is, they don't need to run "ls", "vi"... It's a security approach.&lt;BR /&gt;And how to return back to such menu after users exit the application ?&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Fri, 06 May 2005 08:17:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539295#M222919</guid>
      <dc:creator>yyghp</dc:creator>
      <dc:date>2005-05-06T08:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a special shell menu ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539296#M222920</link>
      <description>In your shell script you can use 'trap' command to catch all the siganls and disable them.</description>
      <pubDate>Fri, 06 May 2005 08:21:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539296#M222920</guid>
      <dc:creator>Amit Agarwal_1</dc:creator>
      <dc:date>2005-05-06T08:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a special shell menu ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539297#M222921</link>
      <description>See 'man sh-posix' or 'man ksh' for more detail.</description>
      <pubDate>Fri, 06 May 2005 08:25:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539297#M222921</guid>
      <dc:creator>Amit Agarwal_1</dc:creator>
      <dc:date>2005-05-06T08:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a special shell menu ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539298#M222922</link>
      <description>As mentioned, the shell script will have trap functions to keep the users from breaking out.&lt;BR /&gt;&lt;BR /&gt;The shell script could also contain 3 case statements corresponding to each of the 3 options that would be available.&lt;BR /&gt;&lt;BR /&gt;I would make this a part of the user .profile.&lt;BR /&gt;Check to connection to see if they are connecting via the handheld and if so, put them in the captive environment.&lt;BR /&gt;</description>
      <pubDate>Fri, 06 May 2005 08:28:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539298#M222922</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-05-06T08:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a special shell menu ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539299#M222923</link>
      <description>The best way to do this is to make your menu script their default shell in /etc/passwd.&lt;BR /&gt;&lt;BR /&gt;The users password entry might look something like&lt;BR /&gt;&lt;BR /&gt;user1:password:555:444::/home/user1:/usr/local/bin/menu&lt;BR /&gt;</description>
      <pubDate>Fri, 06 May 2005 08:30:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539299#M222923</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2005-05-06T08:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a special shell menu ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539300#M222924</link>
      <description>For all those users put a script as a last in the user's .profile file.&lt;BR /&gt;In the script put a trap statements.&lt;BR /&gt;&lt;BR /&gt;trap "" 1 2 3 --&amp;gt; ignote trap for signal 1,2 and 3&lt;BR /&gt;your code for menus goes here. (user case statements here)&lt;BR /&gt;trap 1 2 3 --&amp;gt; trap signals 1,2 and 3 again.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Fri, 06 May 2005 08:30:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539300#M222924</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-05-06T08:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a special shell menu ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539301#M222925</link>
      <description>Hi, &lt;BR /&gt;I should create a shell script like below and make that the default shell in the /etc/passwd file&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;trap '' INT QUIT TERM KILL&lt;BR /&gt;&lt;BR /&gt;while true &lt;BR /&gt;do&lt;BR /&gt;  clear&lt;BR /&gt;  print " Make your choise:"&lt;BR /&gt;  print "************************"&lt;BR /&gt;  print "1. Run Application"&lt;BR /&gt;  print "2. Change Password"&lt;BR /&gt;  print "3. Logout"&lt;BR /&gt;  print "************************"&lt;BR /&gt;&lt;BR /&gt;  read choise&lt;BR /&gt;  &lt;BR /&gt;  case choise in&lt;BR /&gt;    1)&lt;BR /&gt;      do this&lt;BR /&gt;    ;;&lt;BR /&gt;    2)&lt;BR /&gt;      passwd ${LOGNAME}    &lt;BR /&gt;    ;;&lt;BR /&gt;    3)&lt;BR /&gt;      logoff&lt;BR /&gt;    ;;&lt;BR /&gt;    *)&lt;BR /&gt;      print "choose between 1-3"&lt;BR /&gt;    ;;&lt;BR /&gt;  esac&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Renarios</description>
      <pubDate>Fri, 06 May 2005 08:53:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539301#M222925</guid>
      <dc:creator>renarios</dc:creator>
      <dc:date>2005-05-06T08:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a special shell menu ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539302#M222926</link>
      <description>Finally I use this instead:&lt;BR /&gt;&lt;BR /&gt;stty intr undef;stty stop undef;stty susp undef;stty dsusp undef&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Fri, 06 May 2005 12:38:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-write-a-special-shell-menu/m-p/3539302#M222926</guid>
      <dc:creator>yyghp</dc:creator>
      <dc:date>2005-05-06T12:38:41Z</dc:date>
    </item>
  </channel>
</rss>

