What is the maximum number of characters that a user name or group name may be on Linux? I need to allocate a buffer and would like to know how much space I need to allocate to guarantee it is large enough for whatever group or user name my application might encounter. Answer (Putting my comment into an answer now