linux/linux command

사용자 계정 추가 (useradd)

chozo99 2015. 3. 19. 14:29




useradd -U -s /bin/bash -m <username>


       -U, --user-group

           Create a group with the same name as the user, and add the user to this group.


           The default behavior (if the -g, -N, and -U options are not specified) is defined by the USERGROUPS_ENAB variable in /etc/login.defs.



       -s, --shell SHELL

           The name of the user's login shell. The default is to leave this field blank, which causes the system to select the default login shell

           specified by the SHELL variable in /etc/default/useradd, or an empty string by default.



       -m, --create-home

           Create the user's home directory if it does not exist. The files and directories contained in the skeleton directory (which can be

           defined with the -k option) will be copied to the home directory.


           By default, if this option is not specified and CREATE_HOME is not enabled, no home directories are created.