Hi, guys.

This thread[1] (sync adduser with installer) reminded me of a question that I
had:

If I use adduser, I can create a user "firstname.lastname"; if I try that via
the installer,
it doesn't like it - "firstname.lastname is not a useable loginname."

If I look in (4.7) /usr/src/distrib/miniroot/install.sub ...

user_setup() {
        local _q="Setup a user? (enter a lower-case loginname, or 'no')"
[--cut--]
                [a-z]*([a-z0-9_]))
                        (( ${#resp} <= 31 )) && break ;;
                esac
                echo "$resp is not a useable loginname."
        done

So it's looking for a-z 0-9 and underscore (IF I am reading the code
correctly)
- but doesn't allow period?

man adduser says:

RESTRICTIONS
     username
             It is recommended that login names contain only lowercase
charac-
             ters and digits.  They may also contain uppercase characters,
             non-leading hyphens, periods, underscores, and a trailing `$'.
             Login names may not be longer than 31 characters.  If you need a
             longer login name for e-mail addresses, you can define an alias
             in /etc/mail/aliases.

Entirely as a learning exercise - is there a technical reason, or something
that is inadvisable about using the period in the user name?

Thanks.

[1] http://marc.info/?l=openbsd-tech&m=128834251907064&w=2

Reply via email to