I was browsing through some Linux questions and saw this interesting question.
What steps to add a user to a system without using useradd/adduser?
The one possible way that comes to my mind is,
- Add an entry for the user in
/etc/passwdfile. - Add an entry for the group in
/etc/groupfile. - Create the home directory for the added user.
- Set the new user password using the
passwdcommand.
I tested the above approach and it worked fine.
Is this the only possible way or is there any other work around to achieve this?