<?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: shell problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965637#M119331</link>
    <description>Thanks for all your replies, and yes I noted, DO NOT DO This again.&lt;BR /&gt;&lt;BR /&gt;I will need to boot off the HPUX 11.i recovery CD in order to correct this.  The su - root /bin/sh did not work and nothing else did either.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Nickd</description>
    <pubDate>Mon, 05 May 2003 12:07:59 GMT</pubDate>
    <dc:creator>Nick D'Angelo</dc:creator>
    <dc:date>2003-05-05T12:07:59Z</dc:date>
    <item>
      <title>shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965632#M119326</link>
      <description>All, I accidentally changed the root entry in /etc/password to /sbin/ksh however, the file 'ksh' does not exist in /sbin and now I can not correct it.&lt;BR /&gt;&lt;BR /&gt;When I try to logon or even ftp as root, it simply comes back and says No shell.  I can not copy the /usr/bin/ksh to /sbin as I do not have the correct permissions.&lt;BR /&gt;&lt;BR /&gt;HPUX 11.i&lt;BR /&gt;&lt;BR /&gt;Any suggestions?</description>
      <pubDate>Mon, 05 May 2003 11:32:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965632#M119326</guid>
      <dc:creator>Nick D'Angelo</dc:creator>
      <dc:date>2003-05-05T11:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965633#M119327</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Try the following:&lt;BR /&gt;&lt;BR /&gt;  who&lt;BR /&gt;and look for anyone logged in as root.&lt;BR /&gt;If yes  find  her and have her change&lt;BR /&gt;/etc/passwd.&lt;BR /&gt;&lt;BR /&gt;. boot in single-user mode.&lt;BR /&gt;&lt;BR /&gt;No matter how you fix this, my advise is to&lt;BR /&gt;never change the login-shell for root.&lt;BR /&gt;/sbin/sh  is  special is it does not depend&lt;BR /&gt;on shared libs  like all other shell do.&lt;BR /&gt;&lt;BR /&gt;Olav</description>
      <pubDate>Mon, 05 May 2003 11:39:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965633#M119327</guid>
      <dc:creator>Olav Baadsvik</dc:creator>
      <dc:date>2003-05-05T11:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965634#M119328</link>
      <description>Login as a non-root ID and su to root.  Be sure to just su and not "su -". That way the login process will still leave your login in the original environment.  &lt;BR /&gt;&lt;BR /&gt;If that does not work, you are left with booting off of the cd and fixing the file.  You should (depending on what version of HP-UX) get a menu once booted on the cd that will allow you to run in a limited environment.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
      <pubDate>Mon, 05 May 2003 11:41:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965634#M119328</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2003-05-05T11:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965635#M119329</link>
      <description>Hi Nick,&lt;BR /&gt;better consult this thread:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1e88abe92dabd5118ff10090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1e88abe92dabd5118ff10090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Mon, 05 May 2003 11:47:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965635#M119329</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-05-05T11:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965636#M119330</link>
      <description>hi,&lt;BR /&gt;1. try if booting in single user mode helps.&lt;BR /&gt;&lt;BR /&gt;2. do you have an entry in /.rhosts. then try rcping the ksh file or a copy of the passwd file with correct entry.&lt;BR /&gt;&lt;BR /&gt;3. login as ordinary user and then try a su and see if it works. &lt;BR /&gt;&lt;BR /&gt;and never change the shell of root. it is normally in /sbin directory and even if you dont have your usr volume mounted, u can still login as root.&lt;BR /&gt;&lt;BR /&gt;-balaji</description>
      <pubDate>Mon, 05 May 2003 11:48:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965636#M119330</guid>
      <dc:creator>Balaji N</dc:creator>
      <dc:date>2003-05-05T11:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965637#M119331</link>
      <description>Thanks for all your replies, and yes I noted, DO NOT DO This again.&lt;BR /&gt;&lt;BR /&gt;I will need to boot off the HPUX 11.i recovery CD in order to correct this.  The su - root /bin/sh did not work and nothing else did either.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Nickd</description>
      <pubDate>Mon, 05 May 2003 12:07:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965637#M119331</guid>
      <dc:creator>Nick D'Angelo</dc:creator>
      <dc:date>2003-05-05T12:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965638#M119332</link>
      <description>Nick,&lt;BR /&gt;And what if you have "+" in /.rhosts and "rcp /bin/ksh server:/sbin/ksh" where server is your computer.This way no shell executed,though these "high security" times &lt;BR /&gt;many sysadmins are paranoid about "+" in rhosts.:).&lt;BR /&gt;&lt;BR /&gt;Best wishes&lt;BR /&gt;&lt;BR /&gt;Zeev</description>
      <pubDate>Mon, 05 May 2003 13:01:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965638#M119332</guid>
      <dc:creator>Zeev Schultz</dc:creator>
      <dc:date>2003-05-05T13:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965639#M119333</link>
      <description>going to single user mode should be your very last option.&lt;BR /&gt;&lt;BR /&gt;if you can remsh into the box with another account. and copy ksh to the correct directory.&lt;BR /&gt;&lt;BR /&gt;also if you plan to build a bastian box, by moving root's home directory the there are a few steps you need to perform. otherwise you'll find yourself in the same predicament.&lt;BR /&gt;&lt;BR /&gt;mkdir /root&lt;BR /&gt;cp .profile /root/.profile&lt;BR /&gt;&lt;BR /&gt;edit /etc/passwd&lt;BR /&gt;and change roots home dir to /root&lt;BR /&gt;&lt;BR /&gt;peace&lt;BR /&gt;Donny</description>
      <pubDate>Mon, 05 May 2003 14:02:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965639#M119333</guid>
      <dc:creator>Donny Jekels</dc:creator>
      <dc:date>2003-05-05T14:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965640#M119334</link>
      <description>I wonder...&lt;BR /&gt;&lt;BR /&gt;Could you somehow, as another user, copy /sbin/sh into /sbin/ksh?&lt;BR /&gt;&lt;BR /&gt;Take care.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 May 2003 12:51:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965640#M119334</guid>
      <dc:creator>Raynald Boucher</dc:creator>
      <dc:date>2003-05-06T12:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965641#M119335</link>
      <description>I had to do this on a Linux box last week, and I've been doing this kind of thing on various and sundry versions of Unix for a long time now.  &lt;BR /&gt;&lt;BR /&gt;When booting off the CD, you will not have access to all the libraries and executables that you normally have.  One thing you can do is mount the / file system to the /mnt (or some other) directory, then cd into that directory.&lt;BR /&gt;&lt;BR /&gt;One thing you can do is type "echo MYNAME::0:3::/:/sbin/sh&amp;gt;&amp;gt;/mnt/etc/passwd".  This sets up new user called MYNAME and gives it root equivalency without a password.  You can do this because when you boot off the CD, you only have root access.&lt;BR /&gt;&lt;BR /&gt;Then log off and reboot the computer as normal.  When you login as MYNAME, you can  then use vipw to fix the entry for the root account.  Since this is a HEINOUS security violation, immediately remove the MYNAME account thereafter.  &lt;BR /&gt;&lt;BR /&gt;Of course, I recommend that you make a copy of the /etc/passwd file first.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Tue, 06 May 2003 15:56:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965641#M119335</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2003-05-06T15:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965642#M119336</link>
      <description>I experience similar problem years ago. Finally, I'm lucky to find there is cron job running as root. My regular user has permission to modify it. You know what then happened. Run "copy ..." in that script-:)</description>
      <pubDate>Tue, 06 May 2003 19:04:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965642#M119336</guid>
      <dc:creator>David Zheng_1</dc:creator>
      <dc:date>2003-05-06T19:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965643#M119337</link>
      <description>As any user.&lt;BR /&gt;&lt;BR /&gt;cp /etc/passwd /root/passwd&lt;BR /&gt;&lt;BR /&gt;rcp(or scp) other_system://etc/passwd /etc&lt;BR /&gt;&lt;BR /&gt;use vi to delete all but the root entry from this passwd file.&lt;BR /&gt;&lt;BR /&gt;use vi to delete the root entry from the /root/passwd file.&lt;BR /&gt;&lt;BR /&gt;cat /root/passwd &amp;gt;&amp;gt; /etc/passwd&lt;BR /&gt;&lt;BR /&gt;Of course you need to know the root password from the other system.&lt;BR /&gt;&lt;BR /&gt;You should be able to pull this off no matter what root's shell is.  Of course I know you'll never modify roots shell entry again.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 06 May 2003 19:24:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2965643#M119337</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-05-06T19:24:47Z</dc:date>
    </item>
  </channel>
</rss>

