Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Delete users accounts from command line in 10.5' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Delete users accounts from command line in 10.5
Authored by: wallybear on Jun 11, '09 01:03:38PM

"Do you know off-hand if the "id" command and "$0" variable work consistently with 10.3 & 10.4? As you can see I'm trying to keep the script flexible enough to use with all the OS's we're likely to need it with."

The $0 variable is a standard for bash/sh, so it works in 10.3 & 10.4 also.
Regarding the "id" command, man states that "The id command appeared in 4.4BSD."; I don't know if it is available in 10.3.x in general, but I can confirm it is from 10.3.9 and later.



[ Reply to This | # ]
10.5: Delete users accounts from command line in 10.5
Authored by: nilness on Jun 12, '09 07:19:29AM

Thanks... of course I just did a little testing and it looks like the id command won't work in single user mode without starting netinfo/directory services. Not a problem for 10.5 since that has to be done anyway, but I guess I'll have to see about starting & stopping netinfo in 10.3 & 10.4. I'm not sure it's worth the trouble - starting to wonder if listing the user directory might be easier!



[ Reply to This | # ]