Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting Users on Mac is not working #33

Closed
Hoverbear opened this issue Nov 2, 2022 · 2 comments
Closed

Deleting Users on Mac is not working #33

Hoverbear opened this issue Nov 2, 2022 · 2 comments
Labels
bug Something isn't working MacOS Darwin/MacOS

Comments

@Hoverbear
Copy link
Contributor

Hoverbear commented Nov 2, 2022

Deleting Users on a Mac isn't working right now for unknown reasons:

ephemeraladmin@mac-epic-turducken ~ % dscl . -read /Users/_nixbld1
dsAttrTypeNative:_writers_passwd: _nixbld1
dsAttrTypeNative:accountPolicyData:
 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>creationTime</key>
        <real>1667407560.622637</real>
        <key>failedLoginCount</key>
        <integer>0</integer>
        <key>failedLoginTimestamp</key>
        <integer>0</integer>
        <key>passwordLastSetTime</key>
        <real>1667409170.2462959</real>
</dict>
</plist>

dsAttrTypeNative:IsHidden: 1
dsAttrTypeNative:record_daemon_version: 8770000
AppleMetaNodeLocation: /Local/Default
GeneratedUID: 95CA4ABC-6A65-4EE0-8430-1F8BC58E9C64
NFSHomeDirectory: /var/empty
Password: ********
PrimaryGroupID: 3000
RecordName: _nixbld1
RecordType: dsRecTypeStandard:Users
UniqueID: 301
UserShell: /sbin/nologin
ephemeraladmin@mac-epic-turducken ~ % sudo dscl . -delete Users/_nixbld1
<main> delete status: eDSPermissionError
<dscl_cmd> DS Error: -14120 (eDSPermissionError)

This suggests a password is required: https://apple.stackexchange.com/questions/310308/delete-a-standard-user-from-mac-os

ephemeraladmin@mac-epic-turducken ~ % sudo passwd _nixbld1
Changing password for _nixbld1.
New password:
Retype new password:

################################### WARNING ###################################
# This tool does not update the login keychain password.                      #
# To update it, run `security set-keychain-password` as the user in question, #
# or as root providing a path to such user's login keychain.                  #
###############################################################################

ephemeraladmin@mac-epic-turducken ~ % sudo dscl . -delete Users/_nixbld1
<main> delete status: eDSPermissionError
<dscl_cmd> DS Error: -14120 (eDSPermissionError)

Other resources:

@Hoverbear Hoverbear assigned Hoverbear and unassigned Hoverbear Nov 2, 2022
@Hoverbear Hoverbear added the bug Something isn't working label Jan 9, 2023
@Hoverbear
Copy link
Contributor Author

Hoverbear commented Jan 9, 2023

Noting that auto-uid-allocation (NixOS/nix#3600) is a feature we want to use and it should work on Mac (NixOS/nix#7557) in the future.

@Hoverbear Hoverbear added the MacOS Darwin/MacOS label Jan 31, 2023
@grahamc grahamc changed the title Deleting Users on Mac is not working ???? Deleting Users on Mac is not working Feb 10, 2023
@Hoverbear
Copy link
Contributor Author

Hoverbear commented Feb 15, 2023

Related to #250, #251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MacOS Darwin/MacOS
Projects
None yet
Development

No branches or pull requests

1 participant