Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Limit usernames to 32 chars per man useradd #38

Closed
wants to merge 1 commit into from

Conversation

nickjwebb
Copy link

Hit this limit when CFN created users were pulled by import_users.sh (> 32 characters long).

Sorry for the kick patch, but this gets beyond the error. When useradd is called with a username > 32 characters, it returns an error code and message saying "invalid username" or similar. This was blocking other users under the 32 character limit from creating. FWIW, I don't need the script to work with these users, simply don't want it to fail completely.

Hit this limit when CFN created users were pulled by import_users.sh
@michaelwittig
Copy link
Contributor

so I think it would be better to not add users when the clean_username is longer than 32 chars?
otherwise we could run into the issue that two users become one username which must be avoided.
I will add the 32 characters to the limitations

@nickjwebb
Copy link
Author

nickjwebb commented Apr 26, 2017 via email

@michaelwittig
Copy link
Contributor

I created an issue #40 and will close this PR

@michaelwittig
Copy link
Contributor

I open #41 to implement the length check

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants