On Fri, 13 Feb 2009 13:15:12 +0800
Chuanwen Wu <[email protected]> wrote:

> Could you please give more details? How to change it to something
> default?

Well, that's pretty much the basics...
Shells for each system user are defined in /etc/passwd, which should be
edited by 'vipw' command.

What I've meant is the case, when you, or something else changed
'/etc/passwd', replacing '/bin/bash' with something like
'/sbin/nologin' or some other path, which is not a valid shell.

Actually, ssh shouldn't work with invalid shell like that as well, but
one, for example, can add some commands to ".bashrc" which will work
only in ssh environment (using some env vars, set by ssh, for example).

Then, there might be some ssh-only shell, so I'd suggest to set shell
to '/bin/sh' (which is actually bash, for gentoo) and disable all the
configs it's using, like '~/.bashrc' or '/etc/bashrc' (see 'man bash',
for full list).
Also, Neil has made a good point that there might be something
in /etc/profile, which is usually sourced by all bash-like shells.


> I have checked the /var/log/faillog, which I'm not sure whether it's
> the right log file, and seems it only contain binary data(I read it
> from "vi /var/log/faillog").

Syslog usually uses '/var/log/messages' as a collector for everything
that is being sent to it, so I'd check that file first. And make sure
the timestamps there are recent - it should mean that syslog is writing
to it and is not dead.
'dmesg' command is usually a good source for failure messages too, but
only on kernel level (when something really nasty happens). There might
be some segfaults, produced by your shell, and usually indicate
programming or compilation errors.

-- 
Mike Kazantsev // fraggod.net

Reply via email to