bugacl - Bugs: bug #57948, Add an option to manage unknown...


bug #57948: Add an option to manage unknown users and groups

Submitter:  Daniel Dehennin <nebuchadnezzar>
Submitted:  Tue 03 Mar 2020 03:54:06 PM UTC
Category:  None Severity:  1 - Wish
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Tue 03 Mar 2020 03:54:06 PM UTC, original submission:  


When migrating some servers, I took the time to purge my LDAP of old and unused users.

My problem is that the setfacl fails in the middle with “Invalid argument in line 13” because I did the ACLs backup before removing old entries from the LDAP.

It could be great to have options to manage unkown users and groups.

Step to reproduce:

1. add user “foo”: adduser --disabled-login --gecos 'Foo Name,,,,' foo
2. create a file /srv/test: touch /srv/test
3. add some ACL for user “foo” on that file: setfacl -m user:foo:rw /srv/test
4. backup the acl: getfacl /srv/test > /tmp/acls.backup
5. remove the “foo” user: userdel -r foo
6. try to restore the ACLs: cd / && setfacl --restore /tmp/acls.backup

This produce the following error:

    setfacl: /tmp/acls.backup: Invalid argument in line 5

This works when doing the backup with the “--numeric” option, in which case there is no need to resolve the name.

Is it possible to add options like “--unkown-user” and “--unkown-group”? I see 3 useful option value:

- “abort”: the default to be compatible with actual behaviour, exit with an error (maybe a better logging message?)
- “ignore”: skip this ACL entry with a warning message
- “<name>” (or “<ID>”): resolve the name to its ID (or use the ID directly) and replace all unknown names with this, abort if the proposed name is unknown


Daniel Dehennin <nebuchadnezzar>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by vapier (Updated the item)
  • -email is unavailable- added by nebuchadnezzar (Submitted the item)
  • -email is unavailable- added by nebuchadnezzar

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 vapier Severity3 - Normal 1 - Wish
        Summary[feature] Add an option to manage unkown users and groups Add an option to manage unknown users and groups
    2020-03-03 nebuchadnezzar Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-ec27.
    Corresponding source code