4

Now the machine asks for password...The ssh was configured with key auth.. The problem is that ksh doesn't has executable permission anymore.. :\ What can I do remotely? Any tips?

The root's shell was ksh.. :\

p.s.: there aren't any users that use a non-ksh shell+remote login enabled.

LanceBaynes
  • 40,135
  • 97
  • 255
  • 351

5 Answers5

5

Unfortunately AIX su doesn't have the --shell parameter available on other platforms. Do you have any user defined on the system without Korn shell?

Use the serial console and boot into maintenance mode, hopefully it's shell comes up.

Unless prepared before hand network booting likely to be too troublesome.

Otherwise you need someone with physical access and an AIX disk.

Steve-o
  • 420
1

Can you scp over the passwd file to your local box and then replace which shell is your default and scp the file back? Just trying to be helpful.

ojblass
  • 353
1

Can you use the KSH's owner id to login via FTP client FileZilla? It have options to chmod the files in the FTP client.

  • 1
    ftp, sftp, rcp, scp but you have to have non-locked down permissions and hope the shell is not checked. I think ftp only checks the shell name at worst, but scp I think spawns a shell. – Steve-o Aug 29 '11 at 08:28
  • Tried FTP, SFTP, and SCP; no luck – LanceBaynes Aug 29 '11 at 21:36
1

I'm pretty sure you'll need physical access to the machine to fix it.

First, try booting to single user mode. That may fail trying to run ksh though. On PC's you can pass boot parameters to the kernel through [lilo|grub] or through OpenFirmware on SPARC. If there's any type of equivalent on AIX try passing init=/bin/sh as a boot argument.

That should get you at least a shell, but that's all. Your root fs may be mounted read-only, so remount it rw. You should then be able to fix the permissions. Afterward make sure you sync. The kernel will probably panic if you try to exit or reboot, so just expect that. When you're done reset the machine.

Good luck, and may the Force be with you.

bahamat
  • 39,666
  • 4
  • 75
  • 104
0

Can you use ssh with command as argument? Like:

ssh user@hostname /bin/sh
Kevin
  • 40,767
rancor
  • 1