Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-11-2017, 09:09 AM
|
#1
|
Member
Registered: Apr 2015
Distribution: Scientific Linux, Linux Mint
Posts: 37
Rep: 
|
Remove user, but systemd?
I want to remove a user. Well known, this happens with "userdel". But:
sudo userdel baduser
userdel: user baduser is currently used by process 2961
Well, as wise people say, kill process 2961. But this process is "systemd"!!! I surely do not want to kill systemd! What to do?
|
|
|
04-11-2017, 09:43 AM
|
#2
|
Member
Registered: Apr 2015
Distribution: Scientific Linux, Linux Mint
Posts: 37
Original Poster
Rep: 
|
Well, problem solved. After full reboot systemd released baduser.
|
|
|
04-11-2017, 09:46 AM
|
#3
|
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375
|
are you sure it is a legitimate systemd process and not something that has renamed itself systemd? Systemd usually runs at PID 1 after all. I'd check what it's parent is
Code:
ps -o ppid,pid,command | grep "2961"
or
you should be able to track it back to what spawned it from that.
|
|
|
04-11-2017, 09:57 AM
|
#4
|
Member
Registered: Apr 2015
Distribution: Scientific Linux, Linux Mint
Posts: 37
Original Poster
Rep: 
|
Interesting. You are right, PID 1 is systemd. But even after reboot there are other systemd instances appear, like PID 1245, PID 1590. Sorry I am not an expert in systemd.
The first command gives only grep itself.
The second command for both: /lib/systemd/systemd --user
Last edited by John_Brass; 04-11-2017 at 10:01 AM.
|
|
|
04-11-2017, 12:11 PM
|
#5
|
Senior Member
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,247
Rep: 
|
I would also check what "it's" ppid is. Systemd means several processes. It's normal. The first comand shows only processes within that particular session (not very useful) and the second doesn't show the PPID. So I'd suggest ps -ef | grep systemd. For instance:
Quote:
root 1 0 0 Mar17 ? 00:02:14 /usr/lib/systemd/systemd --switched-root --system --deserialize 20
root 425 1 0 Mar17 ? 00:01:10 /usr/lib/systemd/systemd-journald
root 452 1 0 Mar17 ? 00:00:00 /usr/lib/systemd/systemd-udevd
dbus 584 1 0 Mar17 ? 00:01:10 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root 603 1 0 Mar17 ? 00:00:37 /usr/lib/systemd/systemd-logind
|
|
|
|
04-11-2017, 01:17 PM
|
#6
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
on my system, pid 1 is 'init'.
however:
Code:
ls -al /sbin/init
lrwxrwxrwx 1 root root 22 Jan 29 00:32 /sbin/init -> ../lib/systemd/systemd*
|
|
|
04-11-2017, 03:48 PM
|
#7
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,149
|
What someone has done, for some strange reason, is to define a symlink to systemd and call it "init." No idea why.
|
|
|
All times are GMT -5. The time now is 12:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|