display name support
This commit is contained in:
parent
1de8b2ebae
commit
1034adbf9e
1 changed files with 10 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
|||
trap '' SIGINT SIGTERM
|
||||
|
||||
while true; do
|
||||
read -p "Enter a username (lowercase letters, digits, underscores and hyphens): " username
|
||||
read -p "Enter a username (letters, prefferably only lowercase, digits, underscores and hyphens): " username
|
||||
chroot /mnt /bin/bash -c "useradd -m '$username'"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
|
@ -14,6 +14,15 @@ while true; do
|
|||
fi
|
||||
done
|
||||
|
||||
while true; do
|
||||
read -p "Enter a display name: " fullname
|
||||
chroot /mnt /bin/bash -c "usermod -c '$fullname' '$username'"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
while true; do
|
||||
chroot /mnt /bin/bash -c "passwd '$username'"
|
||||
|
||||
|
|
Loading…
Reference in a new issue