Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>System>>Lost Admin Privileges

Lost Admin Privileges


juliandavies
03-15-2006, 12:09 PM
Hi,

Whilst stupidly playing with things I don't understand in NetInfo Manager, trying to change the name of my user from a typo to my proper name, I somehow managed to lose access to my old home directory, whilst simultaneously removing admin privileges from the 'newly created' user that my login now accessed. As my user was the only Admin user I have no access to any admin users, nor had i set a root password.

In summary, I have a user 'juliandaview' who appears in the admin group, within netinfo manager, but has no log in. and a user 'julian' who has no admin rights, or access even to the data within the 'juliandaview' home directory.

Any idea how I can recover this situation ? If I install a new system, will I be able to recover the data within the old user folders ?

Many thanks

Julian

hayne
03-15-2006, 12:28 PM
You could try the procedure for resetting a password after booting from the Install CD/DVD as explained in the last section of this Apple doc:
http://docs.info.apple.com/article.html?artnum=106156

You need to have a backup in any case - even if this trouble hadn't occurred, you need to have a backup as insurance against random hardware problems.
You could restart your Mac from an external disk that has OS X installed on it and then copy your files to the external disk.
Or you could attach your Mac to another Mac using "target disk mode" (http://docs.info.apple.com/article.html?artnum=58583) and then copy your files to that other Mac.

giskard22
03-15-2006, 12:59 PM
As you've noticed, the OS keeps track of which users are administrators by adding them to a group called "admin". If you changed the name in your user record manually, the old username would still be listed in the admin group so the OS thinks your new username is a standard user.

Since you need admin privs to modify the NetInfo database, you're in a bit of a bind. Fortunately, this can be easily solved from the command line in Single User Mode.

To access Single User Mode, restart the Mac and hold cmd-s. You'll get a shell prompt, and you'll be logged in as root. Right above the prompt it will tell you to type something like '/sbin/mount -uw /'. Do so, and press return. Then, type the following and press return:
niutil -insertval . /groups/admin users julian 0
You will get no feedback. However, if you then type:
niutil -readprop . /groups/admin users
you will see a list of admin users, which should now include "julian".

To boot back into regular mode, type 'shutdown -r now' and press return. Then, your new julian user will have admin privs and you can see about fixing things.

BTW, a good way to "correct" a username is to create a new user with the correct name, copy your files, change their ownership appropriately, and delete the incorrect user.


 

TOP

For more info

Core Graphics problem?
Moving the default loc
Delay Before Sleep? 
Quicktime Death 
Boot hangup message 
A lot of corruption pr
~/.MCXLC file and 10.2
Burned DVD data discs 
Creating CUstom Boot I
Console/virtual termin

News Archive

Firewall problems on M
installing osx (10...1
console--what's this? 
Safari and issues with
problem when restart M
My iMac G5 1.8Ghz Hard
Automatically loading 
ibook g3 won't turn on
better choice for empt
How to log other users

Related stories:

Going nutz in "Ignore Permisions" land...
Reinstalling System
bashrc file in linux
Volumes problem
Stuck in the blue screen, nothing seems to fix it
Problems Upgrading to Tiger from Panther
OSX 4.5 won't shut down/restart!

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics