sudo fails intermittently

We use ansible to manage our Macs. ansible will execute sudo many times during the course of the play. Periodically it will fail with:

sudo: 4294967295: invalid value
sudo: error initializing audit plugin sudoers_audit

This is an AD joined machine and the user is an AD user.

Mac mini, macOS 11.2

Posted on Mar 3, 2021 11:27 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 10, 2021 2:09 PM

I started running into this problem a couple weeks ago, and at least for my machine the fix seems to have been to unbind and re-bind to the AD domain. Upon doing this I noticed that the GID had apparently lost its AD mapping, which was fixed upon re-binding to the domain.


## BEFORE unbind/rebind
$ id
uid=1234567891(sanitized) gid=9876543219 groups=9876543219,12(everyone),62(netaccounts),80(admin),399(com.apple.access_ssh),702(com.apple.sharepoint.group.2),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),400(com.apple.access_remote_ae),701(com.apple.sharepoint.group.1)
## AFTER unbind/rebind
$ id
uid=1234567891(sanitized) gid=9876543219(DOMAINNAME\Domain Users) groups=9876543219(DOMAINNAME\Domain Users),12(everyone),62(netaccounts),80(admin),399(com.apple.access_ssh),2128931439(DOMAINNAME\SomeUserGroup),702(com.apple.sharepoint.group.2),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),400(com.apple.access_remote_ae),701(com.apple.sharepoint.group.1),166283020(DOMAINNAME\All Domain Users)


Similar questions

12 replies
Question marked as Top-ranking reply

Mar 10, 2021 2:09 PM in response to Orion Poplawski

I started running into this problem a couple weeks ago, and at least for my machine the fix seems to have been to unbind and re-bind to the AD domain. Upon doing this I noticed that the GID had apparently lost its AD mapping, which was fixed upon re-binding to the domain.


## BEFORE unbind/rebind
$ id
uid=1234567891(sanitized) gid=9876543219 groups=9876543219,12(everyone),62(netaccounts),80(admin),399(com.apple.access_ssh),702(com.apple.sharepoint.group.2),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),400(com.apple.access_remote_ae),701(com.apple.sharepoint.group.1)
## AFTER unbind/rebind
$ id
uid=1234567891(sanitized) gid=9876543219(DOMAINNAME\Domain Users) groups=9876543219(DOMAINNAME\Domain Users),12(everyone),62(netaccounts),80(admin),399(com.apple.access_ssh),2128931439(DOMAINNAME\SomeUserGroup),702(com.apple.sharepoint.group.2),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),400(com.apple.access_remote_ae),701(com.apple.sharepoint.group.1),166283020(DOMAINNAME\All Domain Users)


May 4, 2021 3:32 PM in response to gustavfromvästerås

It does, but it also seems intermittent. Normally "id" reports and resolves the uid/gids fine. Presumably you meant to say something like running "dsconfigad -show" which seems fine and in particular:

Advanced Options - User Experience
  Create mobile account at login = Enabled
     Require confirmation        = Disabled
  Force home to startup disk     = Enabled
     Mount home as sharepoint    = Enabled
  Use Windows UNC path for home  = Enabled
     Network protocol to be used = smb
  Default user Shell             = /bin/bash

Advanced Options - Mappings
  Mapping UID to attribute       = not set
  Mapping user GID to attribute  = not set
  Mapping group GID to attribute = not set
  Generate Kerberos authority    = Enabled

Advanced Options - Administrative
  Preferred Domain controller    = XXXX
  Allowed admin groups           = domain admins,enterprise admins
  Authentication from any domain = Disabled
  Packet signing                 = allow
  Packet encryption              = allow
  Password change interval       = 14
  Restrict Dynamic DNS updates   = not set
  Namespace mode                 = domain

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

sudo fails intermittently

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.