DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-09-05 09:37:00

4wd
New member
Registered: 2008-09-05
Posts: 3

User names - can they start with a number?

Hi all, having just purchased a DNS-313 I've found it to be pretty good for my daily backup needs except for one area - user names.

    if((name.charAt(0)>'0') && (name.charAt(0)<'9'))
    {
        alert("User name must begin with a letter.");
        document.form.f_WEB_NAME.select();
        document.form.f_WEB_NAME.focus();
        return;
    }

and:

    re=/^[a-zA-Z][\w_-]{0,16}$/;   
    if(!re.test(name)){
        alert("User names must begin with a letter.");
        document.form.f_WEB_NAME.select();
        document.form.f_WEB_NAME.focus();
        return false;
    }   


Since the whole OS is based on Linux there should be nothing preventing me from just removing these lines and then creating my preferred user names, right?

Or is there some deep rooted problem that will appear?

TIA

Offline

 

#2 2008-09-05 10:16:10

pcp
Member
From: Moravistan
Registered: 2008-04-23
Posts: 75

Re: User names - can they start with a number?

from man 8 useradd:

Code:

The account name must begin with an alphabetic character and the rest of the string should be from the POSIX portable character
       class ([A-Za-z_][A-Za-z0-9_-.]*[A-Za-z0-9_-.$]).

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB