<?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: Force all users off but root in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/force-all-users-off-but-root/m-p/2415801#M764738</link>
    <description>How do your users connect?  If they use standard TCP access channels (telnet, &lt;BR /&gt;rlogin, etc) then you can simply log into the box, shut down inetd, and then &lt;BR /&gt;kill all user sessions.  (If you are not on a console or remote console, be &lt;BR /&gt;very careful not to kill your own session.)  You now have sole posession of the &lt;BR /&gt;box until you recycle inetd.  If your users connect through other means you &lt;BR /&gt;will have to take the appropriate steps to shut them out (bring down listeners, &lt;BR /&gt;chmod executables, whatever).&lt;BR /&gt;Another means is to create a password file which contains no users other than &lt;BR /&gt;root and system Ids, and move that file into place during testing.  The &lt;BR /&gt;drawback of this is that if you  have any scripts or utilities that use &lt;BR /&gt;logname, whoami, etc to authenticate user identities, they may behave strangely &lt;BR /&gt;while the password file is shifted.</description>
    <pubDate>Wed, 03 Nov 1999 15:47:22 GMT</pubDate>
    <dc:creator>Alan Riggs_1</dc:creator>
    <dc:date>1999-11-03T15:47:22Z</dc:date>
    <item>
      <title>Force all users off but root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/force-all-users-off-but-root/m-p/2415800#M764737</link>
      <description>I was wondering if there was a way to force all users off the system, except &lt;BR /&gt;root, without going to single user mode so I can do some testing for Y2k.  I &lt;BR /&gt;also need to be able to keep them off for a period of time.  I know I could do &lt;BR /&gt;it by setting the users login times but I have hundreds of users and it would &lt;BR /&gt;take to long.  I'm looking for a system wide solution.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;&lt;BR /&gt;Scott</description>
      <pubDate>Wed, 03 Nov 1999 12:51:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/force-all-users-off-but-root/m-p/2415800#M764737</guid>
      <dc:creator>scott rope</dc:creator>
      <dc:date>1999-11-03T12:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Force all users off but root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/force-all-users-off-but-root/m-p/2415801#M764738</link>
      <description>How do your users connect?  If they use standard TCP access channels (telnet, &lt;BR /&gt;rlogin, etc) then you can simply log into the box, shut down inetd, and then &lt;BR /&gt;kill all user sessions.  (If you are not on a console or remote console, be &lt;BR /&gt;very careful not to kill your own session.)  You now have sole posession of the &lt;BR /&gt;box until you recycle inetd.  If your users connect through other means you &lt;BR /&gt;will have to take the appropriate steps to shut them out (bring down listeners, &lt;BR /&gt;chmod executables, whatever).&lt;BR /&gt;Another means is to create a password file which contains no users other than &lt;BR /&gt;root and system Ids, and move that file into place during testing.  The &lt;BR /&gt;drawback of this is that if you  have any scripts or utilities that use &lt;BR /&gt;logname, whoami, etc to authenticate user identities, they may behave strangely &lt;BR /&gt;while the password file is shifted.</description>
      <pubDate>Wed, 03 Nov 1999 15:47:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/force-all-users-off-but-root/m-p/2415801#M764738</guid>
      <dc:creator>Alan Riggs_1</dc:creator>
      <dc:date>1999-11-03T15:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Force all users off but root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/force-all-users-off-but-root/m-p/2415802#M764739</link>
      <description>Hi Scott!!&lt;BR /&gt;First, log off all the users, be polite warning them via wall, then kill their &lt;BR /&gt;process, be care don't kill yourself, if you are root, try this shell:&lt;BR /&gt;&lt;BR /&gt;for i in $(who -u | grep -v root|cut -c44-50)&lt;BR /&gt;do&lt;BR /&gt;kill -9 $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;make a copy from /etc/profile to /etc/profile.ori and another copy from &lt;BR /&gt;/etc/profile /etc/profile.lock&lt;BR /&gt;edit /etc/profile.lock &lt;BR /&gt;eg.&lt;BR /&gt;# @(#) $Revision: 74.2 $    &lt;BR /&gt;&lt;BR /&gt;# Default (example of) system-wide profile file (/usr/bin/sh initialization).&lt;BR /&gt;# This should be kept to the bare minimum every user needs.&lt;BR /&gt;&lt;BR /&gt;# Ignore HUP, INT, QUIT now.&lt;BR /&gt;&lt;BR /&gt; trap "" 1 2 3    &lt;BR /&gt;if [ "$LOGNAME" != "root" ]&lt;BR /&gt;    then&lt;BR /&gt;     echo "Sorry You are not root, Conecction refused "&lt;BR /&gt;     exit&lt;BR /&gt;fi&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;copy /etc/profile.lock to /etc/profile&lt;BR /&gt;&lt;BR /&gt;do your tests and when finish, copy /etc/profile.ori to  /etc/profile&lt;BR /&gt;&lt;BR /&gt;I do this very often and is a system wide solution&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Nov 1999 08:23:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/force-all-users-off-but-root/m-p/2415802#M764739</guid>
      <dc:creator>javier juarez_1</dc:creator>
      <dc:date>1999-11-16T08:23:38Z</dc:date>
    </item>
  </channel>
</rss>

