Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

set default directory for when user logs in

Posted on 2009-04-28
3
Medium Priority
?
211 Views
Last Modified: 2012-05-06
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/
     
0
Comment
Question by:hankknight
  • 3
3 Comments
 
LVL 7

Accepted Solution

by:
martin_2110 earned 2000 total points
ID: 24253942
usermod -d /your/dir username
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24253948
that needs to be done as root.
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24253956
useradd -d /home/foo foo
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 9 hours left to enroll

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question