Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Username length limit

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 1.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      Stugots
      last edited by

      It appears that the maximum username length is 16 characters?  Is there anyway to increase this?

      PC Engines APU2C4

      1 Reply Last reply Reply Quote 0
      • C Offline
        cmb
        last edited by

        That used to be the limit of usernames in FreeBSD. It looks like that was increased to 32 though and no one noticed to change our code to allow longer. It might be as simple as changing the input validation on that page to allow 32 instead of 16, you can give that a shot.

        1 Reply Last reply Reply Quote 0
        • S Offline
          Stugots
          last edited by

          I tried to change the limit from 16 to 20 using Firefox/Firebug, but when I submit the form it resets and re-validates it against the 16 character limit again.

          Looking for the php file on the firewall itself, maybe changing the code itself will work.

          PC Engines APU2C4

          1 Reply Last reply Reply Quote 0
          • S Offline
            Stugots
            last edited by

            That worked:

            [2.2.6-RELEASE][###@###.###]/usr/local/www: diff system_usermanager.php system_usermanager.php-ORIGINAL 
            237,238c237,238
            <       if (strlen($_POST['usernamefld']) > 32)
            <               $input_errors[] = gettext("The username is longer than 32 characters.");
            ---
            >       if (strlen($_POST['usernamefld']) > 16)
            >               $input_errors[] = gettext("The username is longer than 16 characters.");
            548c548
            <                                                                />
            ---
            >                                                                />
            

            PC Engines APU2C4

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.