-u user_id Specify the user ID number for the account (-u 474). Without the -u option,
the default behavior is to automatically assign the next available number.
Replace user_id with the ID number (-u).
For example, let??™s create an account for a new user named Mary Smith with a login name of mary.
First, log in as root, and then type the following command:
# useradd -c ???Mary Smith??? mary
When you choose a username, don??™t begin with a number (for example, 26jsmith). Also,
it??™s best to use all lowercase letters, no control characters or spaces, and a maximum of
8 characters. The useradd command allows up to 32 characters, but some applications can??™t deal
with usernames that long. Tools such as ps display UIDs instead of names if names are too long.
Having users named Jsmith and jsmith can cause confusion with programs (such as sendmail) that
don??™t distinguish case.
TIP
150
Running the Show Part II
Next, set mary??™s initial password using the passwd command. You??™re prompted to type the password
twice:
# passwd mary
Changing password for user mary.
New password: *******
Retype new password: *******
Asterisks in this example represent the password you type. Nothing is actually displayed when you
type the password. Also keep in mind that running passwd as root user lets you add short or
blank passwords that regular users cannot add themselves.
Pages:
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358