I work in support, and occasionally I'm given shell access to a remote Linux system.
I frequently find that when the admin gives me remote access, that I get the following output upon login.
[joe@mycomputer ~]$ ssh bob+ldap@foo.edu
bob+ldap@foo.edu password:
Creating directory '/foobar/users/bob'.
Unable to create and initialize directory '/foobar/users/bob'.
Last login: Mon Jul 29 13:05:27 2013 from bar.edu
Could not chdir to home directory /foobar/users/bob: Input/output error
-bash: /foobar/users/bob/.bash_profile: Input/output error
-bash-4.1$
-bash-4.1$ echo $HOME
/foobar/users/bob
The admins I interact with know way more about Linux than I do. My questions are:
Why do I get "Unable to initialize directory"?
- Is that an error on their part, or is that intentional for security? I'm assuming they ran
useradd bob
without the -m option when they created my account.
- Is that an error on their part, or is that intentional for security? I'm assuming they ran
Why is my shell name 'bash-4.1' and not 'bob'?
Update
I'm guessing that because I am not a normal user on the system, I don't have a network share foobar/users, just local storage. It seems strange that such a high percentage of servers I log into would configure their server the same way.
Resources I have investigated
Unable to create and initialize directory '/foobar/users/bob'.
is the key. Since the folder isn't created your shell cannot chdir to that path since it doesn't exist. The lack of a home folder means no user specific bash profile, so you are defaulting to the default global bash profile that doesn't use the hostname or username in the bash prompt. – Tim Aug 07 '13 at 21:35