Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running Ubuntu 10.04 and I suddenly have this problem where I am kicked out immediately after logging in via ssh or in the console. Here's what it looks like at boot:

Using IPI No-Shortcut mode
registered taskstats version 1
blkfront: xvdb: barriers enabled
 xvdb: unknown partition table
XENBUS: Device with no driver: device/console/0
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
EXT3-fs: barriers not enabled
kjournald starting.  Commit interval 5 seconds
EXT3-fs (xvda): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) readonly on device 202:0.
Freeing unused kernel memory: 412k freed
Write protecting the kernel text: 5704k
Write protecting the kernel read-only data: 1384k
NX-protecting the kernel data: 3512k
hwclock[998]: segfault at 810b4a6 ip 0810b4a6 sp bfe87568 error 15 in bash[810b000+1000]
init: hwclock main process (998) killed by SEGV signal
sh uses obsolete (PF_INET,SOCK_PACKET)
device eth0 entered promiscuous mode
fsck from util-linux-ng 2.17.2
/dev/xvda: clean, 109013/966656 files, 2348914/3840000 blocks
 * Starting Postfix Mail Transport Agent postfix                         [ OK ] 
 * To enable saslauthd, edit /etc/default/saslauthd and set START=yes
 * Starting NTP server ntpd                                              [ OK ] 
 * Starting web server apache2                                                  [Thu Sep 20 05:59:30 2012] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
                                                                         [ OK ]

Ubuntu 10.04 LTS mycomputer.com hvc0

I'm guessing my problem may be coming from "segfault... in bash..."? But, if it is, I have no idea how to fix it. I can boot a recovery disk. Can anyone give me any pointers?

Thanks!

share|improve this question
1  
try ssh -v username@hostname and post the log here, and from the boot log it seems sshd didn't start –  number5 Sep 20 '12 at 6:12
    
actually, once I rebooted, I can't ssh in at all, I can only log into the console (and I still get kicked out immediately) –  Aerik Sep 20 '12 at 6:14

1 Answer 1

up vote 1 down vote accepted

First, run memtest86 on your system. There may be a RAM failure.

If not, you should edit /etc/passwd and set your shell to something other than bash (possibly /bin/sh or /bin/tcsh or any other shell) using a livecd. Then, load up your system and update bash, change your shell back, and try again.

The problem appears to be bash segfaulting for sure. However, other things that cause this issue are setting your shell to /bin/false or something that isn't installed.

share|improve this answer
    
Ok, now I can log in, but I can't reinstall bash. I run apt-get install --reinstall bash and I get "Temporary failure resolving 'us.archive.ubuntu.com'" –  Aerik Sep 20 '12 at 6:48
    
Sounds like it may also have a couple network issues. Keep in mind a bunch of your init scripts won't work properly in this case because they may run in bash - you might have to do some setup tasks like configure your network interface manually. –  Falcon Momot Sep 20 '12 at 6:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.