set default directory for when user logs in

I run a webserver on CentOS 5.  I created a new user called: "foo"

When "foo" logs in via SSH/SFTP the default directory that the session opens to should be:
/home/foo/
     
LVL 16
hankknightAsked:
Who is Participating?
 
martin_2110Commented:
usermod -d /your/dir username
0
 
martin_2110Commented:
that needs to be done as root.
0
 
martin_2110Commented:
useradd -d /home/foo foo
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.