Linux – Why Each Program Has Its Own Account in /etc/passwd

accountsdaemonusers

I checked out the /etc/passwd file and I'm surprised to see that there are 35 different accounts, even though I'm the only user on this computer. I see that the accounts have names like mail, news, www-data, irc, pulse, etc. Why do those each have their own accounts and how are they used?

Best Answer

This is done for 2 reasons. Security and auditing. From a security perspective each service is put into it's own "silo" so that it can be given access to only the resources it needs on the system. These resources can be diskspace, access to files, or allocations of RAM or CPU.

Additionally each service can be walled off from every other service so that only interactions that make sense are allowed.

From an auditing perspective this allows the administrator of the system to easily identify which processes are performing what activities on the system.

References

Related Question