<?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 Script access control in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727487#M254101</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am creating a script that will be used by help desk person to change password. I want that they can only type p for password change. if they type something else it will echo it and will be in the loop so the user donnot need to login again.</description>
    <pubDate>Wed, 08 Feb 2006 21:01:23 GMT</pubDate>
    <dc:creator>Khashru</dc:creator>
    <dc:date>2006-02-08T21:01:23Z</dc:date>
    <item>
      <title>Script access control</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727487#M254101</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am creating a script that will be used by help desk person to change password. I want that they can only type p for password change. if they type something else it will echo it and will be in the loop so the user donnot need to login again.</description>
      <pubDate>Wed, 08 Feb 2006 21:01:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727487#M254101</guid>
      <dc:creator>Khashru</dc:creator>
      <dc:date>2006-02-08T21:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Script access control</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727488#M254102</link>
      <description>You can use something like this:&lt;BR /&gt;&lt;BR /&gt;getoption() {&lt;BR /&gt;echo "Enter p to change a user's password or press q to finish"&lt;BR /&gt;read OPTION&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;getoption&lt;BR /&gt;&lt;BR /&gt;while [ $OPTION != "q" ]; do&lt;BR /&gt;case $OPTION in&lt;BR /&gt;p)&lt;BR /&gt;  echo "Enter user name"&lt;BR /&gt;  read USER&lt;BR /&gt;  passwd $USER&lt;BR /&gt;  ;;&lt;BR /&gt;*)&lt;BR /&gt;  echo $OPTION&lt;BR /&gt;  ;;&lt;BR /&gt;esac&lt;BR /&gt;getoption&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Feb 2006 22:17:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727488#M254102</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-02-08T22:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script access control</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727489#M254103</link>
      <description>Yes thats ok but i donot want the user to get the shell. ie i donot want him to exit from the program. he can only use p for password change. If he press something else it will again ask him for passwd change for other person.</description>
      <pubDate>Wed, 08 Feb 2006 22:24:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727489#M254103</guid>
      <dc:creator>Khashru</dc:creator>
      <dc:date>2006-02-08T22:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script access control</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727490#M254104</link>
      <description>Edit the user's profile, add the path to the this script in the profile, if the file is called for example /usr/local/sbin/changepwd.sh, add to the user's  profile:&lt;BR /&gt;&lt;BR /&gt;# Avoid cancel of the script&lt;BR /&gt;stty  dsusp undef eof undef eol undef eol2 undef discard undef \&lt;BR /&gt;status undef intr undef kill undef lnext undef quit undef reprint undef \&lt;BR /&gt;start undef stop undef susp undef werase undef&lt;BR /&gt;# Start the script&lt;BR /&gt;/usr/local/sbin/changepwd.sh&lt;BR /&gt;# Do not allow access to the shell&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;So, the user won't have access to the shell. When the users logon, the script will start, when he press "q", the exit command will be run and will logout from the system.</description>
      <pubDate>Thu, 09 Feb 2006 00:06:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727490#M254104</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-02-09T00:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Script access control</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727491#M254105</link>
      <description>I will try that tomorrow.</description>
      <pubDate>Thu, 09 Feb 2006 01:22:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727491#M254105</guid>
      <dc:creator>Khashru</dc:creator>
      <dc:date>2006-02-09T01:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Script access control</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727492#M254106</link>
      <description>However, If we add the script with /etc/profile or $HOME/.profile the user is still allowed to use the signal's as ctrl+c or ctrl+d. Which can not be trapped. Better use the script execution as,&lt;BR /&gt;&lt;BR /&gt;nohup passwdscript&lt;BR /&gt;&lt;BR /&gt;which will trap those signal's too.&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Muthu</description>
      <pubDate>Thu, 09 Feb 2006 01:36:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-access-control/m-p/3727492#M254106</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2006-02-09T01:36:48Z</dc:date>
    </item>
  </channel>
</rss>

