<?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: prevent telnet in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211863#M326281</link>
    <description>Here is your answer&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=828012" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=828012&lt;/A&gt;</description>
    <pubDate>Fri, 06 Jun 2008 09:34:34 GMT</pubDate>
    <dc:creator>Jeeshan</dc:creator>
    <dc:date>2008-06-06T09:34:34Z</dc:date>
    <item>
      <title>prevent telnet</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211861#M326279</link>
      <description>How can i prevent telnet for a specify user or account?&lt;BR /&gt;&lt;BR /&gt;help me please</description>
      <pubDate>Fri, 06 Jun 2008 09:16:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211861#M326279</guid>
      <dc:creator>kacou</dc:creator>
      <dc:date>2008-06-06T09:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: prevent telnet</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211862#M326280</link>
      <description>Hi Kacou,&lt;BR /&gt;&lt;BR /&gt;See the below thread.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=92298" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=92298&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Asif Sharif</description>
      <pubDate>Fri, 06 Jun 2008 09:20:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211862#M326280</guid>
      <dc:creator>Asif Sharif</dc:creator>
      <dc:date>2008-06-06T09:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: prevent telnet</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211863#M326281</link>
      <description>Here is your answer&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=828012" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=828012&lt;/A&gt;</description>
      <pubDate>Fri, 06 Jun 2008 09:34:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211863#M326281</guid>
      <dc:creator>Jeeshan</dc:creator>
      <dc:date>2008-06-06T09:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: prevent telnet</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211864#M326282</link>
      <description>i use the code below but the user with id 116 can not log using 'su'? why&lt;BR /&gt;--------------------------&lt;BR /&gt;uid=$(id -u)&lt;BR /&gt;if [[ ${uid} -eq "116" ]]&lt;BR /&gt;then&lt;BR /&gt;echo "This account is not allowed to login &lt;BR /&gt;directly"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Jun 2008 10:59:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211864#M326282</guid>
      <dc:creator>kacou</dc:creator>
      <dc:date>2008-06-06T10:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: prevent telnet</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211865#M326283</link>
      <description>Since a user name is not known until the user tries to login, you need to restrict / permit using code in the system /etc/profile . You cannot restrict by user with /var/adm/inetd.sec, TCP Wrappers, nor IPFilter. Here are some suggestions to follow: &lt;BR /&gt;FIRST, determine if the user logged in via telnet. There are several methods to do this. Here are two to consider: &lt;BR /&gt;1. Examine the user tty to determine if it is a telnet device /dev/pts/t* &lt;BR /&gt;Click here to see an Example: &lt;BR /&gt;if [ `tty | cut -c 1-10` = "/dev/pts/t" ] ;  &lt;BR /&gt;then  &lt;BR /&gt;        ...Code to determine if user is denied or permitted;&lt;BR /&gt;           See the next section of this document.&lt;BR /&gt;           Security tip:   use "logger" to log access attempt&lt;BR /&gt;           by denied users.&lt;BR /&gt;&lt;BR /&gt;fi&lt;BR /&gt;2. Examine the user login process list checking for telnetd to determine if the user is connected via telnet. &lt;BR /&gt;Click here to see how to check for telnetd: &lt;BR /&gt;if [ `ps | grep -q telnetd` ] ;&lt;BR /&gt;then&lt;BR /&gt;        ...Code to determine if user is denied or permitted;&lt;BR /&gt;           See the next section of this document.&lt;BR /&gt;           Security tip:   use "logger" to log access attempt&lt;BR /&gt;           by denied users. &lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;SECOND, detect if the user is denied / permitted access via telnet. There are many methods available. Here are 3 possibilities to consider for denying access: &lt;BR /&gt;1. Examine the user login name and test programmatically with user names hard-coded in /etc/profile. This is useful when only a very small number of users is to be permitted or denied. To see a code example to deny telnet by user name "testhack" go to &lt;A href="ftp://ftp.hp.com/pub/enterprise/programming_code/c00843266_CodeExample_Denying_testhack.txt." target="_blank"&gt;ftp://ftp.hp.com/pub/enterprise/programming_code/c00843266_CodeExample_Denying_testhack.txt.&lt;/A&gt; &lt;BR /&gt;Click here to see a code example to deny access by user name: &lt;BR /&gt;if [ "$LOGNAME" = "testhack" ] ;&lt;BR /&gt;then&lt;BR /&gt;        logger "telnet attempt by $LOGNAME not permitted"&lt;BR /&gt;        exit&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;2. Examine the user login name and test by reading an access/deny list from a flat file. Since the user has to be able to read the file it is not very secure. Make the permissions 444 and owner root/sys . You could create a database of some kind to be more secure. This is useful if you have a large number of users and more than a small number should be permitted or denied. The disadvantage is that the shell could be interrupted by the user before the check is complete, and the execution time could be lengthy causing long login times. &lt;BR /&gt;For an example to deny access to users in the /etc/.deny_telnet file, go to &lt;A href="ftp://ftp.hp.com/pub/enterprise/programming_code/c00843266_CodeExample_Denying_Access.txt." target="_blank"&gt;ftp://ftp.hp.com/pub/enterprise/programming_code/c00843266_CodeExample_Denying_Access.txt.&lt;/A&gt; &lt;BR /&gt;Click here to see a code example to deny access to users in the deny telnet file: &lt;BR /&gt;cat /etc/.deny_telnet | while read name&lt;BR /&gt;do&lt;BR /&gt;    if [ "$LOGNAME" = $name ] ;&lt;BR /&gt;    then&lt;BR /&gt;        logger "telnet attempt by $LOGNAME not permitted"&lt;BR /&gt;        exit&lt;BR /&gt;    fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;3. Use a unique secondary group ID or IDs to identify the permitted or denied telnet users. In the example in /etc/group, testhack is in the group of users not permitted to telnet. &lt;BR /&gt;To see the example go to &lt;A href="ftp://ftp.hp.com/pub/enterprise/programming_code/c00843266_Users_Not_Permitted.txt." target="_blank"&gt;ftp://ftp.hp.com/pub/enterprise/programming_code/c00843266_Users_Not_Permitted.txt.&lt;/A&gt; &lt;BR /&gt;Click here to see an Example of Users Not Permitted Access: &lt;BR /&gt;users::20:root &lt;BR /&gt;notelnet::7777:testhack,sam,joe,jane,michelle&lt;BR /&gt;notelnet2::7778:jim,bill,sue&lt;BR /&gt;&lt;BR /&gt;Code snippet to detect if effective user ID is member of group denied telnet access:&lt;BR /&gt;&lt;BR /&gt;if [`id -Gr  | grep -q -E '7777|7778'` ] ;&lt;BR /&gt;then&lt;BR /&gt;        logger "telnet attempt by $LOGNAME not permitted"&lt;BR /&gt;        exit&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;NOTE: Whatever method is used, please try to be as flexible as possible, and consider ease of maintenance and administration. &lt;BR /&gt;</description>
      <pubDate>Fri, 06 Jun 2008 13:48:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211865#M326283</guid>
      <dc:creator>Avinash20</dc:creator>
      <dc:date>2008-06-06T13:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: prevent telnet</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211866#M326284</link>
      <description>SAFeR product with Fine Grain Privilege + RBAC</description>
      <pubDate>Mon, 09 Jun 2008 05:44:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-telnet/m-p/4211866#M326284</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2008-06-09T05:44:38Z</dc:date>
    </item>
  </channel>
</rss>

