Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal Not Working

Hi! Whenever I launch terminal,I can't type anything and it only shows this message:
-------------------
*login: illegal option -- u*
*usage: login [-pq] [-h hostname] [username]*
*login -f [-lpq] [-h hostname] [username [prog [arg ...]]]*

*[Proceso completado]*
-------------------
Already tried both dumping the Terminal preferences and reintalling the package with Pacifist and the Snow Leopard install DVD.Nothing have worked so far.
Any help please?

Thanks in advance.

Mac OS X (10.6.3)

Posted on Apr 9, 2010 4:14 PM

Reply
17 replies

Apr 9, 2010 6:01 PM in response to -U!

The OS doesn't not create those files. You did somehow and at some point. You won't be able to see these files using anything except the terminal. Make sure that other user is an admin user, log in as the other user, do "sudo bash" to get a root shell, then go over to your original account's home directory and delete/fix your .bash_profile.

Apr 10, 2010 8:03 AM in response to etresoft

-U!,

Has anyone been playing with

/etc/profile

Or

/etc/bashrc

These files may or may not exist, but if they do, you should investigate them.

For example, my /etc/profile looks like

# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi

and my /etc/bashrc looks like

# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='h:W u$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize

I would look at Terminal -> Preferences -> Startup and see what "Shells open with" is set to.

Has the /usr/bin/login program been replaced with a script or a different version.

At anytime in the past, did you use Terminal -> File -> Use Settings as Default?

I know I'm playing 20 questions, and just fishing for a likely cause.

Message was edited by: BobHarris

Apr 10, 2010 9:29 AM in response to M4R4G4T0

Well,the files '/etc/profile' and '/etc/bashrc' are fine.
Terminal preferences on the main account are set to '/usr/bin/login'.
'echo $SHELL' on the 2nd account shows '/bin/tcsh'.

Terminal on the third account with the '-V!' username indeed has the same problem but with a '-v' parameter.However,eliminating the hypen and the exclamation mark on the username of the 1st account doesn't work.

Terminal Not Working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.