Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I messed up my server yesterday, and im not quite sure how to get it straight again. After trying to install SiriProxy by severall guides failing one after the other on the step for rvm and dependencies. I now cant get into my Fedora box anymore. Neither SSH or X seems to load correctly:

Trying to access it thru init 3 / x will result in stopping somewhere during load at desktop. It will let me put my credentials as normal, but then it stops with only the desktop background. Trying to ssh as normal into it gives me the following:

kennhard$ ssh root@192.168.0.201
root@192.168.0.201's password: 
Last login: Mon Feb 18 05:53:46 2013
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

^C-bash: /default: No such file or directory
^CConnection to 192.168.0.201 closed.

Resulting in me having to cancel the connection since nothing happens. It seems like my .bash.rc or something are corrupt for both my root user and local "administrator" account. Also tried accessing the server thry one of the ttys CTRL+ALT+F3, but no go.

How would i proceed to fix this? If I load up the machine in safemode, what logs should i fetch for troubleshooting etc? The problem started while installing and uninstalling rvm. All my cron jobs and headless installations do still work running under both administrator and root user. Such as Webmin, Sopcast, Deluge etc.

share|improve this question

1 Answer 1

From the output, it looks like you have a problem with the initialization files used for bash. This could be ~/.bashrc, ~/.bash_profile, ~/.profile, or another script sourced from those. If this occurs with all users, it will be a system wide file such as /etc/profile.

You can launch bash and skip init files with the following:

ssh foo@host 'bash --norc --noprofile -i'

You can also do this from su:

su -c 'bash --norc --noprofile -i'

This will allow you into the account so you can debug the bash startup process. To do this, run bash with the -x option.

bash -i -x
share|improve this answer

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.