You are not logged in.

#1 2016-01-06 20:37:15

rlees85
Member
From: Daventry, UK
Registered: 2015-04-29
Posts: 98
Website

[SOLVED]Active Directory Users, Local Groups, shadow.service failed...

Hi All

Here is an interesting scenario.

I have a Arch Linux system connected to AD. Using Winbind method in the wiki (with a few tweaks) this works nicely.

However, when I add AD users, to LOCAL groups, an interesting scenario occurs.

On boot, shadow.service enters the failed state. Because Winbind is not yet started, it cannot resolve AD UIDs, and believes that these 'unresolvable' UIDs should not be a member of the local groups - as they do not exist (yet).

Manually running shadow.service after the system is fully booted works perfectly fine, as winbind is up and running.

So my questions are:
1 - is there a proper way to avoid this? as it seems like a massive oversight in shadow.service to me....
2 - is shadow.service doing anything important or can it just be disabled using systemctl and forgotten about?
3 - any other ideas?

My method

groupadd --system localgroup
usermod -a -G localgroup DOMAINNAME\\USERNAME

Next bootup shadow.service fails, errors in the log just see grpck saying "user USERNAME does not exist, remove from group localgroup [y/n]n"

Last edited by rlees85 (2016-01-07 17:32:49)

Offline

#2 2016-01-06 21:02:06

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED]Active Directory Users, Local Groups, shadow.service failed...

1) Put winbind in After= & Requires= of shadow.service ?
2) I have had shadow.service fail numerous times without any noticible effects, but I wouldn't disable or mask it unless you can't find a proper solution.
3) Eat, drink and be merry.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2016-01-07 17:32:36

rlees85
Member
From: Daventry, UK
Registered: 2015-04-29
Posts: 98
Website

Re: [SOLVED]Active Directory Users, Local Groups, shadow.service failed...

Solved. I just put "network.target" and "winbindd.service" in After and Requires as you suggested. Seems to work fine.

Maybe this check could / should be made optional for people using AD...

Either way I've marked the thread as solved, even though it is kind of only half solved smile

Offline

#4 2016-01-11 20:55:22

rlees85
Member
From: Daventry, UK
Registered: 2015-04-29
Posts: 98
Website

Re: [SOLVED]Active Directory Users, Local Groups, shadow.service failed...

Actually the above did NOT solve the solution. However, the below DID: (changes in Timer section)

/usr/lib/systemd/system/shadow.timer

[Unit]
Description=Daily verification of password and group files

[Timer]
OnBootSec=15m 
OnUnitActiveSec=1d

This runs the service 15 minutes (give or take a minute) after bootup completes. Then it runs once per day whilst the system is up.

The default is to run every day but persistently so if the timer has not run for 24 hours when you boot it runs immediately on boot (before Winbind, even if you specify after, requires, etc in the service unit).

Offline

Board footer

Powered by FluxBB