You are not logged in.

#1 2024-04-09 09:41:50

Zenin0
Member
Registered: 2024-04-09
Posts: 3

[SOLVED] Failed to enable unit: unit multi-user.target

So, I was trying to create a MAC Spoffing service using mcchanger, as the Wiki suggest i created this service:
https://wiki.archlinux.org/title/MAC_ad … cchanger_2

And added this code:

[Unit]
Description=macchanger on %I
Wants=network-pre.target
Before=network-pre.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
ExecStart=/usr/bin/macchanger -r %I
Type=oneshot

[Install]
WantedBy=multi-user.target

But when executing the

sudo systemctl enable macspoof@.service

This is the output

❯ sudo systemctl enable macspoof@.service
[sudo] contraseña para isaac: 
Failed to enable unit: Destination unit multi-user.target is a non-template unit.

Why it seems like multi-user.target is not a template in my computer?
I've checked if it's written right what it seems to be other people problem but not mine

Can anyone help me?

Last edited by Zenin0 (2024-04-09 10:25:52)

Offline

#2 2024-04-09 09:44:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,786

Re: [SOLVED] Failed to enable unit: unit multi-user.target

you need to pass an interface to the template e.g. macchanger@wlan0 or whatever, check ip addr for your interface names

Offline

#3 2024-04-09 09:46:09

Zenin0
Member
Registered: 2024-04-09
Posts: 3

Re: [SOLVED] Failed to enable unit: unit multi-user.target

Oh okay, it works now, sorry didn't know that it needed the argument there
Thanks!

And if i want it to work on every interface, even if it's not  connected yet, how could i do this? smile

Last edited by Zenin0 (2024-04-09 09:48:12)

Offline

#4 2024-04-09 09:52:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,786

Re: [SOLVED] Failed to enable unit: unit multi-user.target

By enabling the service for each interface, that's the point of templated units.

Offline

#5 2024-04-09 09:53:35

Zenin0
Member
Registered: 2024-04-09
Posts: 3

Re: [SOLVED] Failed to enable unit: unit multi-user.target

Okay thanks!

Thats all smile

Offline

#6 2024-04-09 09:56:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,786

Re: [SOLVED] Failed to enable unit: unit multi-user.target

Please shorten the title a bit and then mark as [SOLVED] by editing the title in your first post.

Offline

Board footer

Powered by FluxBB