<?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: why it doesnt work? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669777#M50604</link>
    <description>now i rewrite it and add to etc/profile:&lt;BR /&gt;name=`id -un`&lt;BR /&gt;if [ "$name" = "pin2" ]&lt;BR /&gt;then&lt;BR /&gt;echo " $name not allowed to login..only su"&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;but it still doesnt work ,i still could use pin2 to login&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 22 Feb 2002 03:04:36 GMT</pubDate>
    <dc:creator>thebeatlesguru</dc:creator>
    <dc:date>2002-02-22T03:04:36Z</dc:date>
    <item>
      <title>why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669773#M50600</link>
      <description>&lt;A href="http://ussupport2.external.hp.com/cki/bin/doc.pl/sid=e717c00a0d699871b1/screen=ckiDisplayDocument?docId=200000051899524" target="_blank"&gt;http://ussupport2.external.hp.com/cki/bin/doc.pl/sid=e717c00a0d699871b1/screen=ckiDisplayDocument?docId=200000051899524&lt;/A&gt; &lt;BR /&gt;in this passage,it says:  &lt;BR /&gt; For Bourne and POSIX shells, add the following to /etc/profile: &lt;BR /&gt;&lt;BR /&gt;#unsupported statements to prevent users from login but allow su. &lt;BR /&gt;name=`logname` &lt;BR /&gt;if [ $name = username ] &lt;BR /&gt;then &lt;BR /&gt;echo $name not allowed to login...only su &lt;BR /&gt;exit &lt;BR /&gt;fi &lt;BR /&gt;#end &lt;BR /&gt;&lt;BR /&gt;however i add it to my /etc/profile,but it doesnt work,what's wrong? &lt;BR /&gt;following is : &lt;BR /&gt;name=`logname` &lt;BR /&gt;if [ $name = pin2 ] &lt;BR /&gt;then &lt;BR /&gt;echo " $name not allowed to login..only su" &lt;BR /&gt;exit &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2002 02:25:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669773#M50600</guid>
      <dc:creator>thebeatlesguru</dc:creator>
      <dc:date>2002-02-22T02:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669774#M50601</link>
      <description>Perhaps pin2 should be "pin2" ?&lt;BR /&gt;&lt;BR /&gt;Ron</description>
      <pubDate>Fri, 22 Feb 2002 02:32:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669774#M50601</guid>
      <dc:creator>Ron Kinner</dc:creator>
      <dc:date>2002-02-22T02:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669775#M50602</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Replace logname with id -un and add the double quotes on $name to be sure.&lt;BR /&gt;&lt;BR /&gt;name=`id -un` &lt;BR /&gt;if [ "$name" = "pin2" ] &lt;BR /&gt;then &lt;BR /&gt;echo " $name not allowed to login..only su" &lt;BR /&gt;exit &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 22 Feb 2002 02:36:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669775#M50602</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-22T02:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669776#M50603</link>
      <description>Well, I should say to use ". ie. &lt;BR /&gt;&lt;BR /&gt;if [ "$name" = "pin2" ] &lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Kenny.</description>
      <pubDate>Fri, 22 Feb 2002 02:42:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669776#M50603</guid>
      <dc:creator>Kenny Chau</dc:creator>
      <dc:date>2002-02-22T02:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669777#M50604</link>
      <description>now i rewrite it and add to etc/profile:&lt;BR /&gt;name=`id -un`&lt;BR /&gt;if [ "$name" = "pin2" ]&lt;BR /&gt;then&lt;BR /&gt;echo " $name not allowed to login..only su"&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;but it still doesnt work ,i still could use pin2 to login&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2002 03:04:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669777#M50604</guid>
      <dc:creator>thebeatlesguru</dc:creator>
      <dc:date>2002-02-22T03:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669778#M50605</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Tested to work fine for me. &lt;BR /&gt;&lt;BR /&gt;Insert this statement in your /etc/profile right before the loop starts:&lt;BR /&gt;&lt;BR /&gt;echo The login user is `id -un`&lt;BR /&gt;&lt;BR /&gt;What does it show when pin2 logs in?&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 22 Feb 2002 03:11:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669778#M50605</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-22T03:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669779#M50606</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;In other words:&lt;BR /&gt;&lt;BR /&gt;echo The login user is `id -un` &lt;BR /&gt;name=`id -un` &lt;BR /&gt;if [ "$name" = "pin2" ] &lt;BR /&gt;then &lt;BR /&gt;echo " $name not allowed to login..only su" &lt;BR /&gt;exit &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;When you test pin2, you will see the printed output:&lt;BR /&gt;&lt;BR /&gt;The login user is ...&lt;BR /&gt;&lt;BR /&gt;What is printed there?&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 22 Feb 2002 03:15:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669779#M50606</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-22T03:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669780#M50607</link>
      <description>5555&lt;BR /&gt;maybe i didnt understand this script correctly&lt;BR /&gt;&lt;BR /&gt;following is my understanding:&lt;BR /&gt;unix server:A,B&lt;BR /&gt;i add that script to B'/etc/profile,so it means that when i telnet B from A ,and when i &lt;BR /&gt;input pin2 in login,it will not allow me to input passwd.&lt;BR /&gt;&lt;BR /&gt;isnt it?</description>
      <pubDate>Fri, 22 Feb 2002 03:27:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669780#M50607</guid>
      <dc:creator>thebeatlesguru</dc:creator>
      <dc:date>2002-02-22T03:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669781#M50608</link>
      <description>I had tested it too and it really works. Just want to know the message " pin2 not allowed to login...only su " had appeared or not. If not, there is something wrong in the if-then-fi statement.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Kenny.</description>
      <pubDate>Fri, 22 Feb 2002 03:32:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669781#M50608</guid>
      <dc:creator>Kenny Chau</dc:creator>
      <dc:date>2002-02-22T03:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669782#M50609</link>
      <description>That's not how it works..&lt;BR /&gt;/etc/profile will be called only after successful login. Which means that you will ahve to enter your login name &amp;amp; password.&lt;BR /&gt;Then, if your login name if "pin2", you will be thrown out immediately.&lt;BR /&gt;You are specifying "pin2" at the login: prompt, right?</description>
      <pubDate>Fri, 22 Feb 2002 03:32:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669782#M50609</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-02-22T03:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669783#M50610</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;When you telnet from system A to system B, system B will still prompt you for the password before "kicking" you out from system B.&lt;BR /&gt;&lt;BR /&gt;/etc/profile is read upon successful login.&lt;BR /&gt;&lt;BR /&gt;If you do not want the login prompt to be even shown, then you should use /var/adm/inetd.sec (on system B) to restrict the IP addresses (ie. system A fixed IP) that can telnet to system B&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 22 Feb 2002 03:35:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669783#M50610</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-22T03:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669784#M50611</link>
      <description>Well, as what I understand here, you still need to input the password when you telnet B from A after you put that script in the .profile. However, after you input the password, it will not show the prompt and it will show the messages "pin2 not allowed to login...only su" and then logout.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Kenny.</description>
      <pubDate>Fri, 22 Feb 2002 03:36:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669784#M50611</guid>
      <dc:creator>Kenny Chau</dc:creator>
      <dc:date>2002-02-22T03:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669785#M50612</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Just an additional note that by restricting telnet via IP addresses in /var/adm/inetd.sec, you will block all userids from system A, in addition to pin2.&lt;BR /&gt;&lt;BR /&gt;I would say that it is still safe to allow the user to be prompted for password and then get kicked out from /etc/profile. &lt;BR /&gt;&lt;BR /&gt;If you don't like this, the workaround is to create a trust relationship either using SSH (ie. authorized_keys)or .rhosts (insecure) so that the user will not be prompted for login from system A and still get kicked out from /etc/profile (which has traps within which the user cannot break out ie. ctrl-c).&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 22 Feb 2002 03:39:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669785#M50612</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-22T03:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669786#M50613</link>
      <description>If you just want to restrict a user to login to a particular machine, you can modify the /etc/passwd file to change the password field of that user to an "*" so that user cannot login but can be su.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Kenny.</description>
      <pubDate>Fri, 22 Feb 2002 03:46:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669786#M50613</guid>
      <dc:creator>Kenny Chau</dc:creator>
      <dc:date>2002-02-22T03:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669787#M50614</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I agree with Kenny's method. I think changing the passwd field in /etc/passwd is the cleaniest solution to your requirements.&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 22 Feb 2002 03:50:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669787#M50614</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-22T03:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669788#M50615</link>
      <description>well ,i see all you mean,but now i could login with pin2 and dont kick out from /etc/profile.&lt;BR /&gt;&lt;BR /&gt;i tested a shell x:name=`id -un`&lt;BR /&gt;if [ "$name" = "pin2" ]&lt;BR /&gt;then&lt;BR /&gt;echo " $name not allowed to login..only su"&lt;BR /&gt;exit &lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;when i use pin2 to test x,it show&lt;BR /&gt;pin2 not allwed to login..only su&lt;BR /&gt;but pin2 doesnt exit&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2002 04:18:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669788#M50615</guid>
      <dc:creator>thebeatlesguru</dc:creator>
      <dc:date>2002-02-22T04:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669789#M50616</link>
      <description>As what I understand, if you test X in a shell script even with pin2 as the login ID, it will of course did not exit the session because the line "exit" will only exit the shell script but not the telnet session. If you put that in the .profile, it will exit the login (as I had tested it before).&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Kenny.</description>
      <pubDate>Fri, 22 Feb 2002 04:32:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669789#M50616</guid>
      <dc:creator>Kenny Chau</dc:creator>
      <dc:date>2002-02-22T04:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669790#M50617</link>
      <description>i find something so stranger:&lt;BR /&gt;when i use root to login:&lt;BR /&gt;it show:The login user is root&lt;BR /&gt;&lt;BR /&gt;but when i use pin2 to login&lt;BR /&gt;it dosent show the message.&lt;BR /&gt;&lt;BR /&gt;another thing i wanna know,when i login with pin2,system call which profile?&lt;BR /&gt;/etc/profile or /home/pin2/.profile?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2002 04:49:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669790#M50617</guid>
      <dc:creator>thebeatlesguru</dc:creator>
      <dc:date>2002-02-22T04:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669791#M50618</link>
      <description>Are you sure of the shell for the pin2 id?  It sounds like the shell it is using is the wrong one to call /etc/profile.  Can you post the entry from your /etc/passwd file for the pin2 user id?</description>
      <pubDate>Fri, 22 Feb 2002 04:51:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669791#M50618</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2002-02-22T04:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: why it doesnt work?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669792#M50619</link>
      <description>you are right pin2:iLuWY44UDTQSk:1102:1008:,,,:/home/pin2:/usr/bin/csh&lt;BR /&gt;root is sbin/sh&lt;BR /&gt;&lt;BR /&gt;i didnt notice it.&lt;BR /&gt;now ,what should i do &lt;BR /&gt;</description>
      <pubDate>Fri, 22 Feb 2002 05:03:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-it-doesnt-work/m-p/2669792#M50619</guid>
      <dc:creator>thebeatlesguru</dc:creator>
      <dc:date>2002-02-22T05:03:16Z</dc:date>
    </item>
  </channel>
</rss>

