LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Adding entries directly in /etc/passwd,/etc/shadow file (https://www.linuxquestions.org/questions/linux-server-73/adding-entries-directly-in-etc-passwd-etc-shadow-file-867907/)

shree24985 03-11-2011 06:31 AM

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

rafatmb 03-11-2011 07:22 AM

Hi,

No problem on that. I have some scripts that does something like this.

[]'s

Rafa
Linux, Linux and Linux! Suporte Linux


All times are GMT -5. The time now is 08:00 AM.