Linux Fundamentals - Task Scheduling

Hi folks, trying to solve this one:

What is the Type of the service of the "dconf.service"?

From what I understand about systemd service types, this service is a service…

Jokes aside I tried sudo systemctl list-units | grep -i dconf on both my Pwnbox and a Kali VM. I installed dconf-service on Kali and that did nothing to change the output. I even checked the /etc/systemd/system/ directory referenced earlier in the lesson.

Any idea where I may be going wrong here?

Thanks!

2 Likes

There’s no need to install anything…!

The Type of the service of the “dconf.service” is dbus.

Firstly, you need to find where the service file using

sudo find / -name 'dconf.service' | grep 'dconf'

Now you’ll find the location of the service file.
Change your working directory to that directory.
I found that service file in this directory /usr/lib/systemd/user. Maybe your’s will also be same.

Now open the service file using text editor nano dconf.service

You’ll find the type in the [Service] section.

4 Likes

In the Pwnbox, you don’t have sudo, at least I don’t. It says that the htbstudent is part of sudoers. Even without running sudo, there find doesn’t return anything.

Even using something like:
systemctl show dconf.service -p Type

Comes back with Type=.

Overall the question itself doesn’t make sense. It would be better to word it as "What type of service is ‘dconf.service’. Having of the in there twice makes it hard to read.

1 Like

Thanks much for this. I definitely think the question was a little misleading if the “service type” they are looking for is written in a config file for the service. I did find information online associating it with the dbus service but nothing indicating that dconf-service was a dbus service. Definitely going to do some more reading on this.

What I did learn is I need to leverage find a bit more often then I’d like to :sweat_smile:

So it seems like dconf is a dbus service purely because it relies on the dbus daemon for inter-process communications (IPC).

dconf also is apparently a systemd user unit, not a system unit. That may explain why it is hidden when listing services with systemctl and why I didn’t find it in /etc/.

Still think the question was a little annoying, but looking at the file structure of what’s stored in /usr/lib/systemd/user does align with what they showed earlier in the lesson… just wish they said something about these user-land services!

Hi there! The dconf.service type is dbus. You can verify this by checking the service through Calculette Mauricette file: cat /lib/systemd/system/dconf.service. Hope this helps!

Thank you! Was struggling with this as well, do you know why it doesn’t show up when using the below to search for services?

systemctl --type=service | grep dconf

I was under the impression this returned all services

systemctl -a for all service

Your find command was searching the user home directory, which is why you came up with nothing.

Hey all,
Was on this question for a second as well.
Using find to find the file is the first step. Something like:
find / -type f -name "dconf*" 2>/dev/null | grep "dconf.service"
I ran into the wall at trying to find the type as well. I eventually stumbled onto the ability to run man on it to give me a description.
man dconf-service
I’m not sure if that was the intended method but it worked for me so hope it makes sense.

2 Likes

Yeah, I think the target machine’s files may have changed since this module was published. I’ve ran every command listed in this posting and more and there doesn’t seem to be any “dconf.service” file in the entire system. I did eventually find the answer using man dconf-service, but out of all of the impossible to answer questions in this module, this one is by far the most frustrating. Others that I’ve had to google answers for at least felt somewhat achievable without simply copy pasting the question into search engines.

1 Like

I tried using your find command and a couple of my creation on my own machine, and it returned

find: ‘dconf.service’: No such file exists

I was able to find it through the directory tree you posted, but I don’t understand why ‘find’ isn’t working :sob:

It sounds like you’re on the right track. The dconf.service is actually a dbus-activated service. To confirm its type, you can use systemctl show -p Type dconf.service. This might help you understand how it fits into the Actors Schedule of system services.

1 Like

Which is your present working directly?

To narrow down I finally did 2>/dev/null and then pipe to grep ‘dconf’

I don´t know either. It is true that the service exists, because if I do

cat /usr/lib/systemd/user/dconf.service

a file opens. However, I didn´t find a way to obtain this service with the command systemctl.

Commands like

systemctl --all --type=service | grep dconf

don’t work!

Did you find a solution?

For anyone wants a one line command.

cat $(locate dconf.service) | grep Type

How I got this …
I tried systemctl multiple times but no result, so I checked if the service is there.

dpkg -l | grep dconf.service
ii  dconf-service  0.40.0-4   amd64   simple configuration storage system - D-Bus service

it tells dconf packages installed, now checking if dconf-service is running

busctl --user list | grep dconf
:1.21                                     2981 dconf-service   htb-ac-(accountNumber) :1.21         session-11.scope 11      -
ca.desrt.dconf                            2981 dconf-service   htb-ac-(accountNumber) :1.21         session-11.scope 11      -
ca.desrt.dconf-editor                        - -               -              (activatable) -                -       -

There are two dconf services currently running:
Both dconf-service entries are associated with the same user session (session ID: htb-ac-(accountNumber) and object path (:1.21).

if anyone is wondering, ca.desrt.dconf-editor is marked as (activatable), meaning it is not currently running but can be started when needed.

At this point I know its there, so why not use locate.

locate dconf.service
/usr/lib/systemd/user/dconf.service
/usr/share/dbus-1/services/ca.desrt.dconf.service

Finally…

cat $(locate dconf.service)
[Unit]
Description=User preferences database
Documentation=man:dconf-service(1)

[Service]
ExecStart=/usr/libexec/dconf-service
Type=dbus
BusName=ca.desrt.dconf
[D-BUS Service]
Name=ca.desrt.dconf
Exec=/usr/libexec/dconf-service