I would like to use the shutdown /i command on Windows 7 to perform a remote shutdown of a Debian Linux box running Samba 4.5.12 and joined to a domain. SSSD 1.15.0 is also present. Every time I try to perform the shutdown (using a fairly privileged Windows domain user), I can lookup the server in the directory easily enough, but get an error with

Access Denied. (5)

According to 1, this means the user performing the shutdown needs to be an administrator of the target Linux machine with sufficient local privileges, but I don't know how to set it up. I think I need to somehow get a specific domain user into the (Samba) Local Administrators group or maybe delegate some unix group to a that domain group 2

I have tried to do the latter with: net groupmap add ntgroup="Administrators" unixgroup=adm rid=512 type=d

There a unix user having username [bozo] in [adm] on the linux box with matching [domain\bozo] domain user.


You have to check if the specific user (on the Linux machine) have the rights to shutdown the Linux machine.

If there have not the rights to do that, then you could configure that in various ways.

Some of the possibilities to give him the rights to perform a shutdown is with sudo. Sudo gives some user specific rights to do something, what maybe only could do the root.

You should take a look at this link shutdown rights

Another way to configure that is to edit the /etc/shutdown.allow file And add a line with the login name of the Unix user.

Then you could use the command shutdown -a <another arguments> after a reboot.

Another thing what you could try is to add the user into the root group, but then they have a lot of another rights (like the root). I think this is the "dirty" way.

I hope that help you with your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.