用户名的需求

Specifies the user name. Requirements:

  • 必须开始with a lowercase letter.

  • Can contain numbers and lowercase letters.

  • Can include only these three special characters: hyphens ( - ), dots ( . ), and underscores ( _ ).

  • Can have a maximum of 32 characters.

  • Cannot be empty.

  • Cannot contain uppercase letters.

  • Cannot be:admin,root, orremote_user.

  • Cannot be Linux reserved names such as:

    daemon,bin,sys,sync,proxy,www-data,备份,list,irc,gnats,nobody,systemd-bus-proxy,sshd,messagebus,rpc,systemd-journal-gateway,systemd-journal-remote,systemd-journal-upload,systemd-timesync,systemd-coredump,systemd-resolve,rpcuser,vagrant,opsd,rdanet,_lldpd,rdaadmin,rdaweb,docker_container,tss.