|
|
#21 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
okay, let's see if you can add the admin group back and then add some users to the admin group...
this is easier done than explained. catwoman thinks it should look something like this, with only your username in the users value field. launch netinfo and authenticate. select 'groups' in the middle window, or at the root of the hierarchy. then select menu Directory->New Subdirectory name it admin now, you're going to add three more properties and their values select menu Directory->New Property for each of the following property/value pairs. prop - val passwd - * gid - 80 users - wkm2424 then, click off the admin entry and it should ask you to save. let us know. ----- bakaDeshi, he can't sudo because sudo is driven by entries in the /etc/sudoers file, group admin is allowed to sudo, but wkm2424 isn't an admin and his nidb is bereft of the admin group, thus the above exercise. |
|
|
|
|
|
#22 |
|
Triple-A Player
Join Date: Apr 2002
Location: Restaurant at the End of the Universe
Posts: 171
|
sudo, shot in the dark.
![]() mT, I don't think wkm is able to authenticate to make changes in netinfo, see previous post. unless I read wrong. Another shot in the dark. I have a local.nidb-backup in /var/db/netinfo/ directory with a much older mod date. Although, even if wkm had this I think sudo is needed to do niload. As I said, chicken and egg... -bD
__________________
—bakaDeshi Caution! Mac User at the Command Line. |
|
|
|
|
|
#23 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
he says he can authenticate neti mugger.
perhaps he could su and niload. su is not bound by a sudoers type gag. su needs to be fed the original root password that was installed, or the real root password, if wkm2424 changed it. wkm2424, can you su? % su password: # root password, the original or changed. root# _ if you can get that, prehaps we could carefully load some stuff, but i wouldn't want to load bakaDeshi's dirty laundry
|
|
|
|
|
|
#24 |
|
All Star
Join Date: Jan 2002
Location: CO, USA
Posts: 908
|
The last resort is to boot the machine in single user (hold Cmd-S while it starts up), and run
Code:
fsck mount -uw / nicl -raw /var/db/netinfo/local.nidb Code:
-create /groups/admin -create /groups/admin passwd * -create /groups/admin gid 80 -create /groups/admin users wkm2424 quit Last edited by blb; 07-09-2002 at 02:30 AM. |
|
|
|
|
|
#25 |
|
Triple-A Player
Join Date: Apr 2002
Location: Restaurant at the End of the Universe
Posts: 171
|
kool stuff blb.
my dirty laundry would definitely clog his system. ![]() wkm, each line blb has there is a single command(hit return after each one), excuse if you're familiar with CLI, just making sure you don't hose your sys anymore than it is. Let us know.
__________________
—bakaDeshi Caution! Mac User at the Command Line. |
|
|
|
|
|
#26 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
ah, blb, most excellent. thanks for the majik.
|
|
|
|
|
|
#27 |
|
Triple-A Player
Join Date: Jun 2002
Location: sioux falls, sd
Posts: 144
|
alright, thanks, but um...which method should i try first? which is safest, considering i know practically nothing (yet) about unix and how i could possibly mess up the system.
|
|
|
|
|
|
#28 |
|
MVP
Join Date: Jan 2002
Location: Wasilla, AK
Posts: 1,043
|
Do the blb voodoo majik....
Keep the chicken handy. |
|
|
|
|
|
#29 |
|
Triple-A Player
Join Date: Jun 2002
Location: sioux falls, sd
Posts: 144
|
i did it, baby!!
man, booting in single user was a scary experience. i thought i was sitting in front of a windows machine for a minute there.
but it works!! thanks, blb! it worked beautifully. i don't think i've ever been as scared as i was just now with no clue what i was doing. my account has admin status again, so what do i care about what i was doing?! actually, i do...could you (blb) explain what the instructions you gave me are doing step by step so i know what was happening and how it got to working? (just in case i end up being stupid again in the future or get lucky enough to help someone in the same mess i found myself in) i understood the create parts in nicl (what's nicl, by the way?), but not Code:
fsck mount -uw / nicl -raw /var/db/netinfo/local.nidb again, thanks a lot. you guys have been excellent. this is definitely the ONE forum i can tell people they WILL get help. other forums are nice, but not nearly as helpful as this one. |
|
|
|
|
|
#30 |
|
All Star
Join Date: Jan 2002
Location: CO, USA
Posts: 908
|
First, single-user mode is the guaranteed way to get root on your machine (unless it's really, really hosed). Useful if you can't get root and your admin status is lost...
As far as the commands, fsck is the file system checker (command line version of Disk First Aid, basically). You ran that just to make sure nothing odd was going on with the file system. mount -uw / mounts the root file system so you can write to it. By default, single-user mounts it read-only, as that is the only safe time fsck can be run. Since nicl needs to modify files, we need to have it read-write. nicl -raw /var/db/netinfo/local.nidb is the way you edit NetInfo when the daemons for it are not running, which is most definitely the case in single-user. It stands for NetInfo CommandLine, and lets you do basically everything you can from NetInfo Manager through the command line (as do niload and niutil when the daemons are running). /var/db/netinfo/local.nidb is where NetInfo is stored on disk, so changing that will update what NetInfo uses when you go multi-user. |
|
|
|
|
|
#31 |
|
MVP
Join Date: Jan 2002
Location: Wasilla, AK
Posts: 1,043
|
blb: Pure genius!
wkm242, you may now get rid of the chicken. |
|
|
|
|
|
#32 |
|
Triple-A Player
Join Date: Jun 2002
Location: sioux falls, sd
Posts: 144
|
blb, thanks very much. but jeez...where/when/how did you learn all this complicated stuff?
i mean, it's surprising to me when i see the knowledge some people have of osx these days. osx came out just over a year ago or something, and already there's people who seem to know just about everything there is to know about osx! would i be right in that there's a man page on fsck and everything else you've helped me with? of course, i coulda just checked, so lemme rephrase: is there a man page for every command in osx? in other words, if i sit through the man pages and read them all, and understand them all, will i eventually get to the point where someone can say "pure genius" to me? cause that's what i'd really, really like to happen!
|
|
|
|
|
|
#33 | |||||||||||||||||||
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
OSX has unix under the hood, and aqua is just a professional GUI on top of it. some of us have experience in other OS's, and understand that most OS's try to accomplish the same thing: shove bits around. so, it's a small step to transfer those skills. beware of the allness fallacy. you can never know everything about something. if you do, that something is obsolete and/or useless. there's an awful lot to know and you don't need to know it all but you do need a solid foundation and the ability to find out more. tenacity is a good quality to have. there is not a man page for every command. most commands have man pages, some don't. if you read all the man pages, expect to be taken away by men in white coats. the man pages are some of the most obscure, fustian prose on the planet. use the man pages for reference. you don't need to read every word of a man page. when exploring a command, grok what you need to move forward. there are many options to some commands that you may never need, so don't get hung up there. a lot of people falter at this point. start with a google: [ unix tutorial ] and get to know how to use the commands 'man' and 'apropos' then, what you need is a few good books, a good chair and well lit study. and get in the habit of counsulting google on unix topics. you'll need to become a bit of a translator, too, as the various flavors of unix have some different semantics. there's a high learning curve. it'll be frustrating, at times, in the beginning. then, in ten years of dedicated study and application, you're either a genius, or in marketing. |
|||||||||||||||||||
|
|
|
|
|
#34 | |||||||||||||||||||
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
Re: i did it, baby!!
wkm, you'll note that the nicl commands blb provided affected the results i tried to walk you thru in the netinfo mgr GUI app make that connection - it's an important one. |
|||||||||||||||||||
|
|
|
|
|
#35 |
|
Triple-A Player
Join Date: Jun 2002
Location: sioux falls, sd
Posts: 144
|
gotcha. thanks...
about the man pages...ok, so maybe i won't know everything there is to know from the man pages, but you plan on being around for me to learn from, don't you?? |
|
|
|
|
|
#36 |
|
MVP
Join Date: Jan 2002
Location: Wasilla, AK
Posts: 1,043
|
In addition to books, lurk around here watching for interesting threads. If you have an idea what the thread starter is trying to accomplish, open your terminal, and "follow along". Of course, make sure you know what you're getting into, i.e. have a general understanding of the situation, and what you may be doing to your system.
Who knows, you may even have the opportunity to drop the occasional 'chicken' reference here and there. (notice, i contributed nothing of value to the thread, except a bit of encouragement perhaps), but ended up learning quite a bit from it.You can learn a lot watching others. |
|
|
|
|
|
#37 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
AKcrab makes an excellent point. follow along and play. responsibly.
reading a lot of shell wonkery, or any wonkery for that matter, is only so much fun. if you see a command used and want to know more about it, familiarize yourself with it's man page (just to get the jist) and then try the command for yourself. especially, when you see a lot of piped commands, their a bit bewildering because the interim results are masked from your observation, so run them in parts to see what they do. e.g., here's the commands to remove all foreign languages sans english from your rig's apps... Code:
$ cat englize
#!/bin/sh
echo="echo"
[ "$1" = "doit" ] && echo=""
sudo find / -xdev -type d -name "*.lproj" -print | \
grep -Eiv "en.lproj|english.lproj" | \
sudo xargs -n1 -i ${echo} rm -rf "{}"
you would learn a bit about the commands by breaking the pipes ( | ) down to their atomic elements and running and observing and trying some mods on the commands. as an exercise, modify the command so that it checks other partitions, filters out swedish too, and logs what it does. log hint: % man tee note: after reviewing the commands, i found that the OSX xargs command doesn't grok the switches used above; the fink version of xargs is extended to handle input better, so the above script is for finkers with xargs installed. so, as another exercise, make the above work with vanilla OSX commands
|
|
|
|
|
|
#38 |
|
Triple-A Player
Join Date: Jul 2002
Location: Virginia
Posts: 106
|
I have no help to offer, but just the commiseration that I made the same mistake: in ignorant and simple bliss of previous Mac experience, I deleted the original admin username and finding out by painful degrees that the other admin account lost its admin status.
Since this was early in the process, not shortly after taking the new computer out of the box, I just reformatted the damn thing after discovering the problem. |
|
|
|
|
|
#39 | |||||||||||||||||||||||
|
Prospect
Join Date: Oct 2003
Location: Venice, CA US
Posts: 20
|
Just noticed how old this thread was!! BIG BIG thanks to blb for this...I just got my boss' daughter's absent admin status problem fixed from 9,000 miles away by walking her thru this procedure (she didn't take her install disc with her when she took off for college in Europe). It worked without a hitch! Anyway, just thought folks might like to know this still works in Tiger :-) And thanks again, blb, for helping me look like a genius! |
|||||||||||||||||||||||
|
|
|
|
|
#40 |
|
Registered User
Join Date: Nov 2006
Posts: 1
|
I too ran into this same problem after attempting to back-up my drive to an external. Ran instructions in post #24 and it was sucessfull. thank you very much for your assistance. I have my computer back!
|
|
|
|
![]() |
|
|