Which option needs to be set to create a home directory for a new user using "useradd" command? code example

Example 1: is a command to create a user account named serena, including a home directory and a description.

[root@RHEL5 ~]# head -1 /etc/passwd
root:x:0:0:root:/root:/bin/bash

Example 2: is a command to create a user account named serena, including a home directory and a description.

[root@RHEL5 ~]# useradd -m -d /home/yanina -c "yanina wickmayer" yanina
[root@RHEL5 ~]# tail -1 /etc/passwd
yanina:x:529:529:yanina wickmayer:/home/yanina:/bin/bash

Tags:

Misc Example