1

I am trying to change the home directory of a user. using

usermod ravishshankar --home /var/www/domainname/public_html/ but get

usermod: user username is currently used by process 1378 I try to kill pid 1378 but get bash: kill: pid: arguments must be process or job IDs

I tried pkill -STOP -u user but still get process 8009 in user by the user.

7
  • 1
    Is the user logged into the system? Commented Jan 11, 2021 at 2:14
  • negative. One of my software automatically makes a user account in CentOS when I configure a new user in the software. I deleted the user from the software but it still looks like the process is being used. Commented Jan 11, 2021 at 2:17
  • 1
    If the user isn't logged in, then pkill -u username and then run the usermod command. Commented Jan 11, 2021 at 2:23
  • I ran the commands but now a new pid is showing up as currently in use for user. Is there a way I can log the user out directly? Commented Jan 11, 2021 at 2:42
  • 1
    SIGSTOP pauses a process: the process will still exist. Commented Jan 11, 2021 at 7:25

2 Answers 2

2

Of course you get that output.

kill pid will give you that error message, while kill 1378 will just kill the process (if you are authorized to do that). If that fails contact the user, or kill -9 1378.

And as ctrl-alt-delor remarked: SIGSTOP will pause the process, not kill it.

If a new process is created every time that you kill the process, you may want to look at the parent process (PPID in the ps -ef output). That is the most likely suspect that creates the new processes (unless ppid==1; then you need to investigate further)

-1

Processes were coming from one of the softwares. So I made a webmaster account instead of the user account.

1
  • 3
    I am not sure if this is an answer. I any case it does not tell me what was wrong, or how to fix it. If you were to come back in a year, with the same problem, then would this help you? Commented Jan 11, 2021 at 7:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.