How to add user on Embedded System

The directions below were provided by someone on the unslung mailing list. unslung is a linux OS for LinkSys's $100 NSLU2 NAS controller.

I'm posting the query here because
(1) I think it is really a generic linux/unix questions
(2) I did not get a response in the unslung mailing list.

I thought it was standard to put user "siegfried"'s directory the users in /home/siegfried but Lance (the author of the instructions below) claims /home/user/siegfried is the convention he is going to follow.

So after creating /home/user with the root account, what "chown" or "chmod" (or other commands) do I want to apply to /home/user so that when I log in as siegfried, I can be in the /home/user/siegfried account?

Thanks,
siegfried
-----------------------------------------------------------------------

Here is my original post to the nslu2-general mailing list:

>
># mkdir /home/user/xyz
># mkdir /home/user/xyz/src
># mkdir /home/user/xyz/bin
>
>To make xyz the owner of this directory, and its contents:
>
># chown -R xyz /home/user/xyz
>
>In order to give xyz a way to execute the gcc compiler which you have
>installed, and other programs, create a file called .profile
>(Commands for the vi editor may be found at
>Home | Chemistry | Brown University):
>
># vi /home/user/xyz/.profile
>("i" enters insert mode,
>type "PATH=/bin:/sbin:/opt/bin:/opt/sbin:/home/user/xyz/bin" (without
>quotes), <ESC>, ZZ (to save and exit))
>
>Next modify the password file to change the home directory of xyz,
>and to use the bash shell
>
># vi /etc/passwd
>
>Edit the xyz line to replace the text after the second-to-last colon
>(":") with "/home/user/xyz:/sbin/bash"
>
>When you've exited vi, you can use the following command to print the
>file to the screen to see that it looks right
>
># cat /etc/passwd
>
>Now you can login to xyz and enter your password
>
># login xyz
>
Here is what I get:
bash-3.2$ ssh -p 22 root@10.169.1.10
root@10.169.1.10's password:
Welcome to Unslung V2.3R63-uNSLUng-6.8-beta
---------- NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG ----------
BusyBox v0.60.4 (2005.03.22-06:52+0000) Built-in shell (ash)

Enter 'help' for a list of built-in commands.

# login siegfried

Password:
No directory, logging in with HOME=/
Welcome to Unslung V2.3R63-uNSLUng-6.8-beta
---------- NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG ----------
BusyBox v0.60.4 (2005.03.22-06:52+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

$

I cannot cd into /home/user/siegfried

I tried doing chmod 777 /home/user but this did not help!

What am I doing wrong?

Thanks,

Siegfried

There are several standards whether /home/siegfried or /home/user/siegfried doesn't matter. But you need to pick something and stick with it. Do this command:
grep siegfried /etc/passwd
to see where the system thinks the directory should be. And siegfried should own his home directory.
chown siegfried /home/user/siegfried

There are differing standards on permissions...my choice:
chmod 755 /home/user/siegfried

Just remember that the directory must agree with what is in /etc/passwd.