<?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: change shell on login as root in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254823#M678233</link>
    <description>Hi,&lt;BR /&gt;I already tested su - root -c /sbin/sh but does not work coz shell is loaded before.&lt;BR /&gt;I have tried your suggestion but ftp also fails... I see in syslog file:&lt;BR /&gt;FTP LOGIN REFUSED (shell not in /etc/shells) &lt;BR /&gt;&lt;BR /&gt;Would it be possible to fix at least connecting on the console? I suppose that shell is not loaded in single-user osr something like that and /etc/passwd might be changed, or not&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Wed, 20 Aug 2008 05:26:56 GMT</pubDate>
    <dc:creator>diego mec</dc:creator>
    <dc:date>2008-08-20T05:26:56Z</dc:date>
    <item>
      <title>change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254819#M678229</link>
      <description>Hi,&lt;BR /&gt;I have a problem with the shell of user root, I changed the default shell directly in /etc/passwd file (big mistake), removing /sbin/sh and inserting /usr/local/bin/bash. But this shell, bash, is not properly installed, so now I cannot login or su - root.&lt;BR /&gt;Of course, I am not able also to modify back this file since I cannot login as root.&lt;BR /&gt;If I do su - root, I get an error when the system tries to load the bash shell and am disconnected.&lt;BR /&gt;The server is remote so I cannot access the console.&lt;BR /&gt;Is there any means to login as root but using sh shell and then fix the problem?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2008 04:56:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254819#M678229</guid>
      <dc:creator>diego mec</dc:creator>
      <dc:date>2008-08-20T04:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254820#M678230</link>
      <description>Never, never change root's shell in /etc/passwd.&lt;BR /&gt;&lt;BR /&gt;Now try this:&lt;BR /&gt;&lt;BR /&gt;# su root -c /sbin/sh</description>
      <pubDate>Wed, 20 Aug 2008 05:14:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254820#M678230</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2008-08-20T05:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254821#M678231</link>
      <description>You shouldn't really change the shell of root coz root's shell should only reside in /sbin and also libraries required should be /lib which means only /sbin/sh is accepted as shell of root.&lt;BR /&gt;One way you could try is ftp the /etc/passwd to someother server, edit the file and put the file back using ftp.&lt;BR /&gt;Coz any other methods will use shell from passwd file and wont let you login.</description>
      <pubDate>Wed, 20 Aug 2008 05:16:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254821#M678231</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2008-08-20T05:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254822#M678232</link>
      <description>Yes, default shell for root user should never change to other like ksh or bash (in linux)...&lt;BR /&gt;&lt;BR /&gt;This is HP recommendation also.&lt;BR /&gt;&lt;BR /&gt;Doing ftp is good option as rajeev suggested..&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2008 05:19:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254822#M678232</guid>
      <dc:creator>Deepak Kr</dc:creator>
      <dc:date>2008-08-20T05:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254823#M678233</link>
      <description>Hi,&lt;BR /&gt;I already tested su - root -c /sbin/sh but does not work coz shell is loaded before.&lt;BR /&gt;I have tried your suggestion but ftp also fails... I see in syslog file:&lt;BR /&gt;FTP LOGIN REFUSED (shell not in /etc/shells) &lt;BR /&gt;&lt;BR /&gt;Would it be possible to fix at least connecting on the console? I suppose that shell is not loaded in single-user osr something like that and /etc/passwd might be changed, or not&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 20 Aug 2008 05:26:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254823#M678233</guid>
      <dc:creator>diego mec</dc:creator>
      <dc:date>2008-08-20T05:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254824#M678234</link>
      <description>If you bring down the server and boot again, the system will complain about the shell, stop boot and end with a /sbin/sh prompt.&lt;BR /&gt;&lt;BR /&gt;The only problem is to bring down the system - last effort will be a power cycle or hard reset.</description>
      <pubDate>Wed, 20 Aug 2008 05:30:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254824#M678234</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2008-08-20T05:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254825#M678235</link>
      <description>Hi Diego,&lt;BR /&gt;&lt;BR /&gt;Would it be possible to fix at least connecting on the console? I suppose that shell is not loaded in single-user osr something like that and /etc/passwd might be changed, or not&lt;BR /&gt;&lt;BR /&gt;Yes, but you will have to reboot your server. You don't have to boot in to single user mode, this will be done automaticly. &lt;BR /&gt;&lt;BR /&gt;Login&lt;BR /&gt;# mount -a&lt;BR /&gt;set your TERM&lt;BR /&gt;# vi /etc/passwd&lt;BR /&gt;and change the root shell back to /sbin/sh&lt;BR /&gt;:wq!&lt;BR /&gt;# shutdown -r -y now&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Wed, 20 Aug 2008 05:34:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254825#M678235</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2008-08-20T05:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254826#M678236</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You have not really tried what Torsten suggested!&lt;BR /&gt;&lt;BR /&gt;su root -c /sbin/sh&lt;BR /&gt;&lt;BR /&gt;You still used a hyphen in front of the root. Use it without the hyphen (dash). Just use &lt;BR /&gt;su root&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
      <pubDate>Wed, 20 Aug 2008 05:57:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254826#M678236</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2008-08-20T05:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254827#M678237</link>
      <description>Hi,&lt;BR /&gt;in fact I did test all possibilities, including without the hyphen:&lt;BR /&gt;som@gpparlay[HP-UX]:/home/som# su root -c /sbin/sh&lt;BR /&gt;Password: &lt;BR /&gt;/usr/lib/hpux32/dld.so: Unable to find library 'libtermcap.so'.&lt;BR /&gt;Killed</description>
      <pubDate>Wed, 20 Aug 2008 07:27:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254827#M678237</guid>
      <dc:creator>diego mec</dc:creator>
      <dc:date>2008-08-20T07:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254828#M678238</link>
      <description>If you have sudo you can use it to invoke a shell as root. sudo does not rely on the shell defined in /etc/passwd.&lt;BR /&gt;&lt;BR /&gt;If you have an NFS mount you might be able to put a setuid shell on the server and run it on the client to get root access.&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2008 14:01:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254828#M678238</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2008-08-20T14:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: change shell on login as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254829#M678239</link>
      <description>Hi Diego:&lt;BR /&gt;&lt;BR /&gt;You could perform an "expert recovery" from your core media, loading a virgin copy of '/usr/newconfig/etc/passwd' to remaster a valid '/etc/passwd' which you then subsequently fix or restore:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/5992-3336/ch13s03.html" target="_blank"&gt;http://docs.hp.com/en/5992-3336/ch13s03.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 20 Aug 2008 15:11:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-shell-on-login-as-root/m-p/4254829#M678239</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-20T15:11:43Z</dc:date>
    </item>
  </channel>
</rss>

