<?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: Disallow remote root, but all ow others in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664325#M756543</link>
    <description>To prevent root from logging in to CDE at any display: &lt;BR /&gt;&lt;BR /&gt;Create /etc/dt/config/Xsession.d/0001.noroot (755 root sys) with the following contents: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;if [ $USER = root ]; then&lt;BR /&gt;   /usr/dt/bin/dterror.ds 'Root Access Denied\n&lt;BR /&gt;   Login as a non-root user, \n&lt;BR /&gt;   or as root through Command Line Login' 'title' 'OK'&lt;BR /&gt;   exit 0&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;To prevent root from logging in at remote displays (Xterminals, PC Xemmulators): &lt;BR /&gt;&lt;BR /&gt;Create /etc/dt/config/Xsession.d/0001.noremoteroot (755 root sys) with the following contents: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;if [ $USER = root ]; then&lt;BR /&gt;    if [ ! "$DISPLAY" = "local_hostname:0.0" ] ; then&lt;BR /&gt;        /usr/dt/bin/dterror.ds 'Remote Root Access Denied\n&lt;BR /&gt;        Login as a non-root user,\n&lt;BR /&gt;        or as root at the console' 'title' 'OK'&lt;BR /&gt;        exit 0&lt;BR /&gt;   fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;With the second option, replace "local_hostname" with the short hostname of the 9000 in question. &lt;BR /&gt;Both of these options will present a user who attempts to login to CDE as root through the prevented means with a dialog box with the associated text. When the user clicks "OK", the login banner will reappear. &lt;BR /&gt;&lt;BR /&gt;Note: The "title" argument is passed to dterror.ds as a required field, but in this case (displaying the pop-up during an attempted CDE login) there is no window manager running. The text given for title will therefor not been seen. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;so depending upon who and where you  want to prevent them login on you should be able to adapt this for all users too ?&lt;BR /&gt;&lt;BR /&gt;ps you'd need to restart X for it to take effect !&lt;BR /&gt;</description>
    <pubDate>Thu, 14 Feb 2002 13:53:29 GMT</pubDate>
    <dc:creator>Alex Glennie</dc:creator>
    <dc:date>2002-02-14T13:53:29Z</dc:date>
    <item>
      <title>Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664311#M756526</link>
      <description>Hey Folks!&lt;BR /&gt;&lt;BR /&gt;I would like to configure an HPUX 10.20 box to DISallow root to remotely login via rlogin or telnet, but allow other users to remotely login and then su to root.  &lt;BR /&gt;&lt;BR /&gt;I would also like to allow root to log in directly from a terminal attached directly to the box, but only a text terminal, not an xterminal should one ever get attached directly to the box.)&lt;BR /&gt;&lt;BR /&gt;Hope this is clear and thanks in advance!&lt;BR /&gt;Mike</description>
      <pubDate>Wed, 13 Feb 2002 18:25:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664311#M756526</guid>
      <dc:creator>Mike_316</dc:creator>
      <dc:date>2002-02-13T18:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664312#M756527</link>
      <description>Create an entry in the remote .rhosts file with the following,...&lt;BR /&gt;&lt;BR /&gt;[hostname] -root&lt;BR /&gt;&lt;BR /&gt;This should deny root rlogins, but allow 'su' once the user is logged in.&lt;BR /&gt;&lt;BR /&gt;Share and Enjoy! Ian</description>
      <pubDate>Wed, 13 Feb 2002 18:29:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664312#M756527</guid>
      <dc:creator>Ian Dennison_1</dc:creator>
      <dc:date>2002-02-13T18:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664313#M756528</link>
      <description>Fantastic!  I will try it...however, can wildcards be used in the .rhosts file.  I don't want ANY machine to be able to remote in as root, but don't want to have to maintain a list of all the machines on the network ON all the machines on the network (all the machines need to be set to disallow this.)&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;Mike</description>
      <pubDate>Wed, 13 Feb 2002 18:34:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664313#M756528</guid>
      <dc:creator>Mike_316</dc:creator>
      <dc:date>2002-02-13T18:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664314#M756529</link>
      <description>create the file /etc/securetty and add the following:&lt;BR /&gt;&lt;BR /&gt;console&lt;BR /&gt;tty1&lt;BR /&gt;&lt;BR /&gt;and whatever hardwired tty's you have from which you want root access.  Note that this does not prevent anyone who knows the root password from doing su from a remote login to get to root.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
      <pubDate>Wed, 13 Feb 2002 18:37:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664314#M756529</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-02-13T18:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664315#M756530</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;you could look into inmplementing inetd.sec to disallow remote login using root user id,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90685/B2355-90685_top.html&amp;amp;con=/hpux/onlinedocs/B2355-90685/00/00/10-con.html&amp;amp;toc=/hpux/onlinedocs/B2355-90685/00/00/10-toc.html&amp;amp;searchterms=inetd.sec&amp;amp;queryid=20020213-104557" target="_blank"&gt;http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90685/B2355-90685_top.html&amp;amp;con=/hpux/onlinedocs/B2355-90685/00/00/10-con.html&amp;amp;toc=/hpux/onlinedocs/B2355-90685/00/00/10-toc.html&amp;amp;searchterms=inetd.sec&amp;amp;queryid=20020213-104557&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2002 18:43:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664315#M756530</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2002-02-13T18:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664316#M756531</link>
      <description>Great!  I will try that too...unfortunately, the .rhosts is not working to prevent remote login.  I remember reading somewhere that the root user is exempt from that sort of control (I.E.  Any OTHER username entered in the .rhosts with a minus sign will not be allowed remote login, but root is allowed even if it is seen in the .rhosts.)&lt;BR /&gt;&lt;BR /&gt;Regardless the I tested it from a specificmachine by entering the following in the .rhosts file ...&lt;BR /&gt;&lt;BR /&gt;&lt;SPCIFICMACHINENAME&gt; -root&lt;BR /&gt;&lt;BR /&gt;...and when I tried to rlogin and telnet from the &lt;SPECIFIC machine=""&gt; it asked for the username and password and root was alloed to login remotely (without an su.)&lt;BR /&gt;&lt;BR /&gt;By the way, it is GOOD that a user can su once in remotely, we just don't want people logging in as root from a remote session, we want them to have to login as a user first...THEN su to root.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;Mike&lt;/SPECIFIC&gt;&lt;/SPCIFICMACHINENAME&gt;</description>
      <pubDate>Wed, 13 Feb 2002 18:46:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664316#M756531</guid>
      <dc:creator>Mike_316</dc:creator>
      <dc:date>2002-02-13T18:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664317#M756532</link>
      <description>Sanjay, &lt;BR /&gt;&lt;BR /&gt;Thanks for the document.  I had thought about the inetd.sec file, however I don;t know the syntax to disallow just root.  It seems only to allow or disallow hosts, and I want users to be able to do rlogin, telnet, and remsh from all the hosts...just not root.&lt;BR /&gt;&lt;BR /&gt;I am not sure how to tell it to disallow just root from all hosts.&lt;BR /&gt;&lt;BR /&gt;Quite a quandry ...&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;Mike</description>
      <pubDate>Wed, 13 Feb 2002 18:53:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664317#M756532</guid>
      <dc:creator>Mike_316</dc:creator>
      <dc:date>2002-02-13T18:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664318#M756533</link>
      <description>Mike,&lt;BR /&gt;&lt;BR /&gt;My apologies, I got my wires crossed while reading the original spec. I was thinking 'remsh' and 'rlogin' without a password being prompted for.&lt;BR /&gt;&lt;BR /&gt;I think this is definitely a job for a package of some description. The last site I worked at disabled root from logging in on anything but the console, but I cannot remember if that stopped rlogins.&lt;BR /&gt;&lt;BR /&gt;Best of luck with the solution. Ian</description>
      <pubDate>Wed, 13 Feb 2002 18:54:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664318#M756533</guid>
      <dc:creator>Ian Dennison_1</dc:creator>
      <dc:date>2002-02-13T18:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664319#M756534</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;/etc/securetty is THE way to go for disallowing root login from anywhere but the console and whatever other devices you want to include.  Man login gives you an example.&lt;BR /&gt;&lt;BR /&gt;It is a very good practice to require login as non-superuser then su to root.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Wed, 13 Feb 2002 18:57:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664319#M756534</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-02-13T18:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664320#M756535</link>
      <description>Hello Mike,&lt;BR /&gt;&lt;BR /&gt;if you have "dtlogin" running (i.e. CDE), then do not forget to deny "root" (or better: uid=0) in /*/dt/config/Xstartup:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;if [ "$LOGNAME" = "root" ]&lt;BR /&gt;then exit 1&lt;BR /&gt;fi&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;where "/*/" is "/etc/" and "/usr/", of course.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch</description>
      <pubDate>Wed, 13 Feb 2002 23:15:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664320#M756535</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2002-02-13T23:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664321#M756536</link>
      <description>OK.  Here's how I did it.  The /etc/securetty was really the right answer.  By telling the machine that the only secure terminal is the console attached to the machine, root can only directly login from there.  So telnet will not allow root login (as telnet is not 'secure' according to /etc/securetty.&lt;BR /&gt;&lt;BR /&gt;However, this still allowed for rlogin to work.  So I used /var/adm/inetd.sec to refuse ALL rlogins by adding the line ...&lt;BR /&gt;&lt;BR /&gt;login deny.&lt;BR /&gt;&lt;BR /&gt;... Now NO ONE can login via an rlogin, however as remsh (rsh) are controlled by a different daemon, you can still run a remote shell, even as root.&lt;BR /&gt;&lt;BR /&gt;Thanks to everytone for getting me on the right track!&lt;BR /&gt;&lt;BR /&gt;Mike</description>
      <pubDate>Wed, 13 Feb 2002 23:17:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664321#M756536</guid>
      <dc:creator>Mike_316</dc:creator>
      <dc:date>2002-02-13T23:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664322#M756537</link>
      <description>Oh!  Thanks for the CDE.  I completely forgot.&lt;BR /&gt;&lt;BR /&gt;I could not get the Xstartup file to have any effect.  It did exist under /usr, but not /etc...however modifying/copying it to the specifications did not seem to have any effect on the login regardless.  So, I put the script in sys.dtprofile and .dtprofile for root, and it has the desired effect.&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;Mike</description>
      <pubDate>Thu, 14 Feb 2002 00:16:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664322#M756537</guid>
      <dc:creator>Mike_316</dc:creator>
      <dc:date>2002-02-14T00:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664323#M756539</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; However, this still allowed for rlogin to work. So I used /var/adm/inetd.sec to refuse ALL rlogins by adding the line ... login deny. ... Now NO ONE can login via an rlogin, however as remsh (rsh) are controlled by a different daemon, you can still run a remote shell, even as root. &lt;BR /&gt;&lt;BR /&gt;If you want to block rlogin, remsh and rexec for all users, the cleaner way would be to simply comment out the following entries from /etc/inetd.conf and run inetd -c to re-read the configuration file:&lt;BR /&gt;&lt;BR /&gt;Comment out these lines:&lt;BR /&gt;&lt;BR /&gt;# exec&lt;BR /&gt;# login&lt;BR /&gt;# shell&lt;BR /&gt;&lt;BR /&gt;Re-read configuration:&lt;BR /&gt;&lt;BR /&gt;# inetd -c&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2002 02:59:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664323#M756539</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-14T02:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664324#M756541</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;Just to followup on rlogin and /etc/securetty...&lt;BR /&gt;&lt;BR /&gt;rlogin disallows root login from terminals not in /etc/securetty IF root is not set up for rlogin without a password by /.rhosts or /etc/hosts.equiv.&lt;BR /&gt;&lt;BR /&gt;I tend to forget that /.rhosts and hosts.equiv get around securetty because I generally don't allow rlogin (or remsh or rexec) by removing them from inetd.conf.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Thu, 14 Feb 2002 13:44:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664324#M756541</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-02-14T13:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664325#M756543</link>
      <description>To prevent root from logging in to CDE at any display: &lt;BR /&gt;&lt;BR /&gt;Create /etc/dt/config/Xsession.d/0001.noroot (755 root sys) with the following contents: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;if [ $USER = root ]; then&lt;BR /&gt;   /usr/dt/bin/dterror.ds 'Root Access Denied\n&lt;BR /&gt;   Login as a non-root user, \n&lt;BR /&gt;   or as root through Command Line Login' 'title' 'OK'&lt;BR /&gt;   exit 0&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;To prevent root from logging in at remote displays (Xterminals, PC Xemmulators): &lt;BR /&gt;&lt;BR /&gt;Create /etc/dt/config/Xsession.d/0001.noremoteroot (755 root sys) with the following contents: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;if [ $USER = root ]; then&lt;BR /&gt;    if [ ! "$DISPLAY" = "local_hostname:0.0" ] ; then&lt;BR /&gt;        /usr/dt/bin/dterror.ds 'Remote Root Access Denied\n&lt;BR /&gt;        Login as a non-root user,\n&lt;BR /&gt;        or as root at the console' 'title' 'OK'&lt;BR /&gt;        exit 0&lt;BR /&gt;   fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;With the second option, replace "local_hostname" with the short hostname of the 9000 in question. &lt;BR /&gt;Both of these options will present a user who attempts to login to CDE as root through the prevented means with a dialog box with the associated text. When the user clicks "OK", the login banner will reappear. &lt;BR /&gt;&lt;BR /&gt;Note: The "title" argument is passed to dterror.ds as a required field, but in this case (displaying the pop-up during an attempted CDE login) there is no window manager running. The text given for title will therefor not been seen. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;so depending upon who and where you  want to prevent them login on you should be able to adapt this for all users too ?&lt;BR /&gt;&lt;BR /&gt;ps you'd need to restart X for it to take effect !&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2002 13:53:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664325#M756543</guid>
      <dc:creator>Alex Glennie</dc:creator>
      <dc:date>2002-02-14T13:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow remote root, but all ow others</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664326#M756545</link>
      <description>Learned something else.  /etc/hosts.equiv is ignored if the local user is a superuser (man hosts.equiv)&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Thu, 14 Feb 2002 15:36:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disallow-remote-root-but-all-ow-others/m-p/2664326#M756545</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-02-14T15:36:09Z</dc:date>
    </item>
  </channel>
</rss>

