Discussion Locked

Creating user in linux as Numeric Only

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I want to create users in linux as numeric (numbers only).Normally we create users as starting with alphabats.Some one told me to create alias file for that users. But is there any better way, so i can directly create users as in numerics

7 replies

by spamlover

If you haven't tried directly editing the /etc/passwd file you might try that. At least doing it that way would bypass any limitations of the adduser command or any GUI tools for adding users.

Make sure you are superuser/root and edit the /etc/passwd file.
Each user on the system has a separate line in the file with the following format:

username:password:uid:gid:optional_info:home_dir:shell

by petronil

yeah sure! You can directly create users in numerics through the adduser command but how about your previous users? Thus this mean that you edit manually your /etc/passwd and your /etc/shadow? If so then it requires you a lot of work to do. I advisethat you create a simple perl script to handle that task for this will minimize your work specially if you have created many users already.

This discussion is closed to new replies.