Jag har nu löst problemet genom att skapa en ny användare i äpple+S läge.
Först tog jag bort input filen som jag lagt i /library/input methods
Sedan eftersom jag har filevault aktiverat var jag tvungen att skapa en ny användare i commando+s läge, logga in där, aktivera root, logga in på root, montera min sparsebundlefil, ta bort motsvarande fil som jag lagt i mitt användar bibliotek.
Ny användare skapade jag utifrån detta tips:
(http://osxdaily.com/2007/10/29/how-to-add-a-user-from-the-os-x-command-line-works-with-leopard/)
On Leopard 10.5 final, substituting “.” for the “/” works. I needed to perform software updates and other admin functions on a Mac with Leopard that I didn’t have the admin password for. Adapting the above steps allowed me to do so (thanks!). What I did:
[boot into single-user mode (hold down cmd-S during early startup)]
/sbin/fsck -fy (to verify integrity of the filesystem)
/sbin/mount -uw / (to be able to make changes to the disk)
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist (to be able to use dscl)
dscl . -create /Users/testuser
dscl . -create /Users/testuser UserShell /bin/bash
dscl . -create /Users/testuser RealName “Test User”
dscl . -create /Users/testuser UniqueID 502 (see notes below about this)
dscl . -create /Users/testuser PrimaryGroupID 80 (I chose to make the user a member of the admin group)
dscl . -create /Users/testuser NFSHomeDirectory /Users/testuser (note this is changed from above)
dscl . -passwd /Users/testuser PASSWORD
dscl . -append /Groups/admin GroupMembership testuser
exit
[restart after Mac OS X loads or login window appears]
[log out if Mac OS X loads straight into a user rather than login window]
[log in as testuser]
[update software, enable root user, do whatever you like]
And then, when I’m ready to delete the user:
[boot into single-user mode]
/sbin/fsck -fy (to verify integrity of the filesystem)
/sbin/mount -uw / (to be able to make changes to the disk)
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist (to be able to use dscl)
dscl . -delete /Groups/admin GroupMembership testuser
dscl . -delete /Users/testuser
cd Users
rm -rf testuser (warning: will delete any files in user home folder)
exit
[restart or shut down after Mac OS X loads]
I chose the UniqueID (502) in a way consistent with the OS: the number 5xx where xx is one greater than the number of users ever created. To figure out the best available number, before issuing the dscl commands to create the user (but after the launchctl command), I typed:
dsexport users.out /Local/Default dsRecTypeStandard:Users
more users
I then scanned the list of users to see any 5xx users and then chose the next highest one available. There was only one user on this system, so that meant 502. I then deleted the export user info file (rm users.out). (I imagine it probably doesn’t really matter what UniqueID you choose as long as it is unassigned, but I am not enough of a Unix guru to know for certain.)
Tack för hjälpen!
Frågan kvarstår om det verkligen går att montera en sparsebundle i commando+s läge.