# Problem with User Login.



## Scotoner (Mar 20, 2011)

Well I did a mistake by running:
`$ pw usermod user_name -s /usr/local/bin/bash`

And now whenever I try to log with that user it keeps redirecting me to login ... Is there a way to make it default again? Thanks.


----------



## kpa (Mar 20, 2011)

Is /usr/local/bin/bash listed in /etc/shells ?


----------



## Scotoner (Mar 20, 2011)

No, it isn't.


----------



## Scotoner (Mar 20, 2011)

I got it! I just changed the directory to /bin/sh using [cmd=]pw usermod user_name -s /bin/sh [/cmd] and everything is ok now! Thank you!


----------



## kpa (Mar 20, 2011)

You have to add it into /etc/shells, login does not allow shells that are not listed there. How did you install bash? The port shells/bash should have automatically added these lines to /etc/shells:


```
/usr/local/bin/bash
/usr/local/bin/rbash
```


----------



## kpa (Mar 20, 2011)

Well.. /bin/sh is not bash in FreeBSD, if you want bash for the user account you have to use the port shells/bash.


----------



## Scotoner (Mar 20, 2011)

I didn't want bash, just got confused with a command and did this mistake. I am really new to Unix Systems. Anyway thanks for guiding me


----------

