Skip to content

Latest commit

 

History

History
28 lines (25 loc) · 694 Bytes

add-linux-user-without-prompt.md

File metadata and controls

28 lines (25 loc) · 694 Bytes
aliases category classification date date_modified draft id image links local_archive_links pinned print series tags title type
add-linux-user-without-prompt
linux
public
2023-01-07 12:41:07 -0800
2023-01-07 12:41:07 -0800
false
20230107204107
false
false
linux
user
useradd
mkpasswd
Add Linux User without Prompt
tech-note
# Create Password (Escape $ with \$ as per https://askubuntu.com/a/982857/911046):
mkpasswd -m sha-512 | sed 's/\$/\\$/g'

# Create user with password:
useradd --create-home --password \$6\$ob93e.m1abmoZRB.\$ad4gujCIwkv8khaT3VeHsR9HJ4QC3J7jUpQO/Z/hIn0b.xHfG5SD8BmS2LmrWsicz3eIHJ.7v..XvajRapSFT0 --shell /bin/bash --groups sudo admin