How to create user with different home directory

Create Directory

#mkdir /data

Create user
Syntax:
# useradd -d /data/userdir  username

Example:
# useradd -d /data/shahzad shahzad

Login in to user

#su - shahzad
$ pwd
/data/shahzad
Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment