Simple Python script to generate username permutations from full names.
The goal of this script is to automate the creation of common username variants, useful for pentesting, user enumeration, OSINT, or auditing.
Inspired by linkedin2username.
fullname2usernames takes either a single full name or a file containing multiple full names (one per line) and generates a list of username permutations based on common patterns like first.last, f.last, firstlast, etc.
The output is a combined file with all generated usernames (all_usernames.txt), and optionally individual files per format (if requested).
Some practical scenarios where fullname2usernames proves useful:
- Active Directory user enumeration during internal pentests:
kerbrute userenum -d <DOMAIN> --dc <DC_IP> all_usernames.txt- OSINT investigations to collect potential email addresses or usernames:
python fullname2usernames.py -u fullnames.txt -d example.com
# Output: elon.musk@example.com, emusk@example.com, etc.- Audit/account discovery for validating user naming conventions across an organization.
usage: fullname2usernames.py [-h] -u USERS [--save-formats [FORMAT]] [-l] [-d DOMAIN]
Generate username permutations from full names.
options:
-h, --help show this help message and exit
-u USERS, --users USERS
Full name or file with full names
--save-formats [FORMAT]
Save each username format in its own file.
Optionally provide one or more formats separated by commas (e.g. --save-formats fn.ln,fnln).
Use -l/--list-formats to view available formats.
Legend: fn = firstname, fi = first initial, ln = lastname, li = last initial
-l, --list-formats List all available username formats with descriptions.
-d DOMAIN, --domain DOMAIN
Adds a domain name to the end of each username (ex: -d example.com => elon.musk@example.com)
- Generate usernames from a single full name:
python fullname2usernames.py -u "Elon Musk"- Generate usernames from a file containing multiple full names:
python fullname2usernames.py -u users.txt- Save individual files for all formats:
python fullname2usernames.py -u users.txt --save-formats- Save individual files for specific formats only:
python fullname2usernames.py -u users.txt --save-formats fn.ln,fnln- Add a domain to all usernames:
python fullname2usernames.py -u users.txt -d example.com- List all available formats:
python fullname2usernames.py -l- All generated usernames combined in
all_usernames.txt - If
--save-formatsis used, individual files for each format are saved in the folder./f2u-individual-usernames/
Here are all supported username formats. You can use -l or --list-formats to display this list from the command line.
Legend:
fn= firstnamefi= first initialln= lastnameli= last initial
All formats:
# No separator
fnln
filn
fnli
fili
lnfn
lnfi
lifn
lifi
fn
ln
# Dot
fn.ln
fi.ln
fn.li
fi.li
ln.fn
ln.fi
li.fn
li.fi
# Dash
fn-ln
fi-ln
fn-li
fi-li
ln-fn
ln-fi
li-fn
li-fi
# Underscore
fn_ln
fi_ln
fn_li
fi_li
ln_fn
ln_fi
li_fn
li_fi- Accepts single full name or file with multiple full names
- Generates a wide variety of common username formats
- Optionally saves individual files per username format
- Validates requested formats before generation
- Lists all available formats with descriptions
- Can append a domain to each username
- Simple, fast, and requires only Python 3