Posted by : FixNox Wednesday, 12 September 2012

By default, when we create or add users to Linux System, user’s default home directory is created to /home. To change default directory to /opt/, we need to change few settings as mentioned below:

STEP 1: Open /etc/default/useradd

# nano /etc/default/useradd

The default home directory defined by HOME variable, find line that read as follows:

HOME=/home replace to HOME=/opt/

Save and close the file. Now you can add user using regular useradd command:

# useradd uddika
# passwd -d uddika

Verify user information:

# finger uddika
Output:
Login: uddika Name: uddika
Directory: /opt/uddika Shell: /bin/bash
Never logged in.
No mail.
No Plan.

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Total Pageviews

Portfolio

Accordition

Recent Comments

Text SlideShow

Contact Info

Followus

Introduction

Featured

About Us

Contact Form




Popular Posts

- Copyright © Redback Solutions -- Powered by Blogger - Designed by Redback Studios -