= UserAdd = '''`useradd(8)`''' creates a user. <> ---- == Installation == [[Linux]] and [[BSD]] distributions will either have `useradd(8)` pre-installed, or direct users to instead use [[AddUser|adduser(8)]]. ---- == Usage == {{{ useradd USERNAME }}} There are different opinions regarding how explicit to be with user groups (i.e. the group named the same as a user with the user as the only member). Above, the group is created implicitly. Sometimes the user group is created first with [[GroupAdd|groupadd(8)]] and set as an option. {{{ groupadd example useradd --gid example example }}} This is more useful when forcing a specific ID. {{{ groupadd --gid 1234 example useradd --uid 1234 --gid example example }}} === UserMod === To modify an exising user, such as adding them to a new secondary group, use '''`usermod(8)`'''. {{{ usermod --append --groups wheel example }}} === UserDel === To delete a user (along with all of their files), use '''`userdel(8)`'''. {{{ userdel --remove --selinux-user USERNAME }}} ---- == See also == [[https://man.archlinux.org/man/useradd.8|useradd(8)]] [[https://man.archlinux.org/man/usermod.8|usermod(8)]] [[https://man.archlinux.org/man/userdel.8|userdel(8)]] ---- CategoryRicottone