Page 1 of 2

Remove a user.

Posted: 2019/11/02 10:00:20
by hack3rcon
Hello,
A CentOS server serving as a web server that hosting a CMS. The username is the domain name. For example, the website name is "myshoppp.com" and CentOS username is "myshoppp".
I want to delete this username and wants to know can it cause any problem?

Thanks.

Re: Remove a user.

Posted: 2019/11/02 12:50:01
by TrevorH
Only you can know that. You set it up. You gave it permissions to things. We have no idea what you did or how or what effect it will have if you remove it.

Re: Remove a user.

Posted: 2019/11/02 12:51:10
by aks
Depends on what that user is running - for example, if this running the httpd daemon (not by default)

Re: Remove a user.

Posted: 2019/11/02 16:19:19
by hack3rcon
TrevorH wrote:
2019/11/02 12:50:01
Only you can know that. You set it up. You gave it permissions to things. We have no idea what you did or how or what effect it will have if you remove it.
I have not configured the server. Another person did it and I can't access to his/her.
How can I understand that the username can affect the system or can't?

Re: Remove a user.

Posted: 2019/11/02 16:32:59
by TrevorH
Then you will have to track through what it owns, what is using the things it owns, what if anything uses that user and then change all that lot. This is a non-standard user so it's not something anyone but you can fix.

Re: Remove a user.

Posted: 2019/11/02 16:45:57
by hack3rcon
TrevorH wrote:
2019/11/02 16:32:59
Then you will have to track through what it owns, what is using the things it owns, what if anything uses that user and then change all that lot. This is a non-standard user so it's not something anyone but you can fix.
Thanks for your advice.
How can I do this track? Any command or location?

Re: Remove a user.

Posted: 2019/11/03 12:54:37
by lightman47
As suggested, it's much more complicated than a single command or location. If it were me, and because CentOS 6 will be going EOL fairly soon, I'd change that user's password so no one could login then just leave the account alone. Then, when you install the new O.S., don't create that user.

BTW - when you change the password, remember the new one - just in case you find you do need that account.

;)

Re: Remove a user.

Posted: 2019/11/03 14:27:28
by TrevorH
How can I do this track? Any command or location?
No, it's a manual process. I'd suggest using the find command to locate files that are owned by that user then review that list to see if any of those are useful. Also check all your running daemons and cron jobs to see if any of those use the user in question.

Re: Remove a user.

Posted: 2019/11/03 16:12:08
by hack3rcon
TrevorH wrote:
2019/11/03 14:27:28
How can I do this track? Any command or location?
No, it's a manual process. I'd suggest using the find command to locate files that are owned by that user then review that list to see if any of those are useful. Also check all your running daemons and cron jobs to see if any of those use the user in question.
Thanks.
How can I use "find" command by owner?
How can I check daemons and cron jobs by user?

Re: Remove a user.

Posted: 2019/11/03 16:23:50
by TrevorH
Enough.

Read some man pages. That's what they're there for.

We're here to teach you how to run your system, not to run it for you. Learn to read the man pages and how to use Google. We cannot do everything for you.