/home Subdirectories


 
Thread Tools Search this Thread
Operating Systems Solaris /home Subdirectories
# 1  
Old 10-05-2004
/home Subdirectories

Hello:
Could someone please explain to me how to create a subdirectory in the /home directory. I have tried creating a new user but the default path for a new user is /export/home. I am running Unix 5.8 on a Sun Blade 100. Thanks.
# 2  
Old 10-05-2004
You need to be root to do this most likely.

Go into /home and do mkdir username to create the new directory for your new user.

Then you need to specify /home/username as the user's home dir when you create the account. I'm not sure how you're doing the account creation, but both the useradd command and the graphical admintool let you specify the home directory path.

Or you could just edit your /etc/passwd file and put the correct home directory entry in for that user once you have the new dir created.

Don't forget to change the ownership of the dir with chown so that the new user owns his home directory. I've done that before and then the user can't access it. Oops.
# 3  
Old 10-05-2004
Error .................

/home is controlled by the auto-mount daemon and should be used for NIS/NIS+ networks. to use /home delete the entry of your /etc/auto_master and restart /etc/init.d/volmgt

greetings PRESSY
# 4  
Old 10-05-2004
Problem Solved

Thanks for the answers. I fixed the mounting of the home directory like Pressy suggested and it worked like a charm. Thanks again!!!
# 5  
Old 10-05-2004
Nice catch Pressy.

I wasn't thinking about the automounter since he mentioned it was a sun blade 100. I assumed (incorrectly it turns out) he was talking about a standalone machine not one on a NIS network.
# 6  
Old 12-20-2004
I would have just done this as root:
# useradd -d /home/<userID> -m -s /bin/ksh <userID>

This would create the home dir in /home/<userID> with the correct user rights.
# 7  
Old 02-21-2006
In Solaris 8 (i.e. SunOS 5.8 - there is no such thing as "unix 5.8"), /home by default is owned by the automounter, wether or not you have NIS installed. Pressy's solution above is the only way to make the automounter let go of /home. There is no way to create any subdirectories in /home unless you make the automounter let go.

In Solaris, useradd does not create home directories for you.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed through all subdirectories?

I found this awesome sed script here: https://www.unix.com/shell-programming-scripting/48228-perl-search-string-line-then-search-replace-text.html sed -i '/MatchText/ s/ReplaceMe/REPLACED/' filename Question though to save me manually doing this. How do I do this from a root directory... (6 Replies)
Discussion started by: Astrocloud
6 Replies

2. Shell Programming and Scripting

diff different subdirectories

I have 2 directories a/ and b/, they have different subdirectories, how to diff with missing file, or missing subdirectory and if i have in a/ directory "a/ACD/DEF" DEF is a file, but in b/ directory "b/ACD/DEF is a SUBDIRECTORY, how to diff it, thanks my solution for directories, ... (7 Replies)
Discussion started by: knajta
7 Replies

3. Shell Programming and Scripting

cp -p /home/* home/exp/*.date not working please help

:( ---------- Post updated at 01:51 AM ---------- Previous update was at 01:50 AM ---------- Not working ---------- Post updated at 02:04 AM ---------- Previous update was at 01:51 AM ---------- cp -p /home/* home/exp/*.`date` i am using this (4 Replies)
Discussion started by: rishiraaz
4 Replies

4. Shell Programming and Scripting

Please help me on how to loop subdirectories

Here is my question in bash for f in f1 f2 do cd $f cd ??? # i need to enter the two layers of sub folders then find the folder named "abcde" ? cd .. # how to get out two layers subdirectories? cd .. done (3 Replies)
Discussion started by: ksgreen
3 Replies

5. UNIX for Dummies Questions & Answers

Please help me on how to loop subdirectories

Here is my question in bash for f in f1 f2 do cd $f cd ??? # i need to enter the two layers of sub folders then find the folder named "abcde" ? cd .. # how to get out two layers subdirectories? cd .. done (2 Replies)
Discussion started by: ksgreen
2 Replies

6. Solaris

how to change /export/home/user dir to /home /user in solaris

Hi all i am using solaris 10, i am creating user with useradd -d/home/user -m -s /bin/sh user user is created with in the following path /export/home/user (auto mount) i need the user to be created like this (/home as default home directory ) useradd -d /home/user -m -s /bin/sh... (2 Replies)
Discussion started by: kalyankalyan
2 Replies

7. Programming

how to simulate "mkdir -p /home/blah1/blah2/blah3" in "c" where only /home exist

I'm trying to make use of mkdir(char *pathname, S_IRWXU) to create the directories. but it only creates one directory at a time. so I have to separate the tokens for "/home/blah1/blah2/blah3" as "home blah1 blah2 blah3" using delimiter "/", but it is again hectic to create such directory... (8 Replies)
Discussion started by: platinumedge
8 Replies

8. UNIX for Dummies Questions & Answers

looping through subdirectories

Hi, How to loop through all the subdirectories in a directory, merge the files present in it to a single file in that subdirectory itself and remove the original files? Please advise. (5 Replies)
Discussion started by: er_ashu
5 Replies

9. UNIX for Dummies Questions & Answers

how to see all the subdirectories easily?

Suppose I have two directories a and b. Each directory has a few subdirectories, a1 a2 a3 and b1, b2, b3 respectively. Using ls, I can see a and b. Then I need cd a, ls, cd ../b, ls to see all the subdirectories. How to see all the directories and subdirectories easily, say using just one... (2 Replies)
Discussion started by: fld2007
2 Replies

10. UNIX for Dummies Questions & Answers

How to search all subdirectories?

Dear All, I want to write the Unix command that searches through all subdirectories, finds the files named ''core'' and deletes them. I will very much appreciate your help. David (4 Replies)
Discussion started by: david_wang
4 Replies
Login or Register to Ask a Question