Weird Names - Servers Administration, Networking, & Virtualization
Users browsing this thread: 6 Guest(s)
|
|||
Hello fellow nixers,
This thread is about a conversation we had yesterday on IRC. I was wondering about usernames on Unix. I'm just gonna post the monologue I had: Quote:what if when you install a Unix OS you choose the username "daemon" or "games" or "man" What do you think? I couldn't find the answer to the first question and I didn't try yet. |
|||
|
|||
venam I did not try yet but I believe that there would be no issue? Why would there be one?
I will link to this answer this is pretty much all I would have said myself: https://serverfault.com/questions/73084/...264#578264 |
|||
|
|||
(09-09-2016, 04:50 AM)TheAnachron Wrote: venam I did not try yet but I believe that there would be no issue? Why would there be one?There would be an issue to the: Quote:what if when you install a Unix OS you choose the username "daemon" or "games" or "man"Some applications try to create those users and are only executed with them. |
|||
|
|||
Can you give me an example application where this username is fix? Because I have not heard of a program yet where I cannot change its daemon/agent username.
|
|||
|
|||
(09-09-2016, 04:57 AM)TheAnachron Wrote: Can you give me an example application where this username is fix? Because I have not heard of a program yet where I cannot change its daemon/agent username.Services and daemon users but also system users. What about the "bin" and "sys" users. I'm thinking about what would happen with the package manager upon installation of a daemon that will create a user with a specific name, let's say "postgres". |
|||
|
|||
Ok, I've ran the test and it confirmed my assumptions.
I've created a user called "redis" and then installed the `redis-server` package. During installation it creates a directory with files /var/run/redis or /run/redis that is owned by the user "redis". So as the redis user I can now edit those files directly. The daemon is also run under the same username. Quote:redis 4121 1 0 08:13 ? 00:00:00 /usr/bin/redis-server /etc/redis/redis.conf Now, what if someone creates a program and name it "john" and runs the daemon as john and it suddenly gets popular and people install it all over the places. |
|||
|
|||
Hey venam that's interesting. But it's also quite obvious, no? In the future someone may name is package "alex-backup" and use the user alex for that.
Good programs/packages/libraries make the user customizeable. (using a configfile or env-variable) One way this could be prevented would be an installation check in the package to install, if the user already exists it should abort. This is again depending on how well the package is made. |
|||