SIMULATION -
Create a user named alex, and the user id should be 1234, and the password should be alex111.
SIMULATION -
Create a user named alex, and the user id should be 1234, and the password should be alex111.
To create a user named alex with a user ID of 1234 and set the password to alex111, follow these steps: Firstly, use the 'useradd' command with the '-u' option to specify the user ID. The command will be: 'useradd -u 1234 alex'. Secondly, use the 'passwd' command to set the password for the user alex. The command sequence will be: 'passwd alex', then enter 'alex111' twice when prompted to set and confirm the password.
useradd -u 1234 -p alex111 -m alex
#useradd -u 1234 alex #passwd alex - it will ask for new password for user alex #cat /etc/passwd | grep alex or id alex - to verify
With The answers I see, it makes the uid and the gid the same while the question asks only the uid to be changed.
It doesn't mention the group ID
#useradd alex -u 1234 #passwd alex #alex111 #alex111
one more '-' needed; echo alex111 | passwd --stdin alex