increase maximum username length

This commit is intended to increase the maximum username length.
Currently we set the maximum username length as 30 characters. However
we have usecases where our username are exceeding the limit
(eg: `obmc.svc_openbmc__central_proxy`, length=31). This limitation
prohibit us to create a new account using this username. By increasing
the limit, we now allow creating an account with longer username.

Tested
- Create an account (post request to `/AccountService/Accounts`)
with 31-100 characters -> expect to be success
- Create an account (post request to `/AccountService/Accounts`)
with 101 characters -> expect to be failed

Change-Id: I15c66d2817eb48aea6b3b47be3d5ab85e08b12d0
Signed-off-by: Malik Akbar Hashemi Rafsanjani <malikrafsan@meta.com>
diff --git a/test/user_mgr_test.cpp b/test/user_mgr_test.cpp
index f07b00c..9dd799a 100644
--- a/test/user_mgr_test.cpp
+++ b/test/user_mgr_test.cpp
@@ -558,7 +558,7 @@
     UserMgrInTest,
     ThrowForUserNameConstraintsExceedSystemMaxUserNameLenThrowsInvalidArgument)
 {
-    std::string strWith31Chars(31, 'A');
+    std::string strWith31Chars(101, 'A');
     EXPECT_THROW(
         throwForUserNameConstraints(strWith31Chars, {}),
         sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument);
diff --git a/user_mgr.cpp b/user_mgr.cpp
index 129e4b4..b7afd16 100644
--- a/user_mgr.cpp
+++ b/user_mgr.cpp
@@ -55,7 +55,7 @@
 
 static constexpr const char* passwdFileName = "/etc/passwd";
 static constexpr size_t ipmiMaxUserNameLen = 16;
-static constexpr size_t systemMaxUserNameLen = 30;
+static constexpr size_t systemMaxUserNameLen = 100;
 static constexpr const char* grpSsh = "ssh";
 static constexpr int success = 0;
 static constexpr int failure = -1;