Adding entries directly in /etc/passwd,/etc/shadow file
Hello,
I am working on building a customized ISO image of a server based on linux.
The thing is after the server is installed and run for the first time, three users have to be created for the various services to run properly. I want this to be automated.
TO achieve this what is was thinking is automatically enter the user entries in the /etc/passwd and /etc/shadow files through init scripts when the server starts for the first time after the installation.
I tried creating user and assigning password in one of my machine, and the /etc/passwd and the /etc/shadow entries of this user i copied it into the other machine and tried login in on the other machine and evertyting worked fine.
Please advise if there is anything wrong in how I am trying to achieve this.
Thanks
|