| Recent
Articles |
IT Staff Must Adapt This is not what you want to hear from anyone if you work in technology. The sad reality is that while companies learn to do things, and business should drive IT, people who are in IT and not adapting are...
IT Horror Stories: Interviewing I interview a lot of folks, I coach, I mentor, and I cull resumes with wild abandon. I love this job because I get to meet people, lots of people, and help them get...
Insiders And The Risky Business Of Security One person with an administrator password and access to critical systems can cause chaos within a business. The time has arrived to crack down before something really sensitive gets compromised. Back in September...
Viable Alternative To SCO OpenServer? I was a little surprised by this Newsgroup thread that began with asking "With the chapter 11 filing and other recommendations, what is a good, long time...
IT Analyst Firms Help In Purchasing Decisions The Motley Fool has a pretty interesting article on IT analyst firms such as Gartner & Forrester. I've worked with these firms for nearly a decade and do believe that they provide a valuable service to their customers...
|
|
11.19.07
Leopard Directory Services - Dscl & Related Commands
By
A.P. Lawrence
I was no great fan of Netinfo, and I think it's great that Apple has gone to XML driven Directory Services as a replacement.
It turns out that modifying "niutil" scripts isn't too painful; Apple has a post about Converting Scripts for Leopard, but it doesn't give many examples.
Let's look at adding a user to a group. With "niutil", we would have done something like:
to add "tom" to "uucp". How would you do that with Leopard?
First, there are a number of "ds" commands. If you type "ds" in a Terminal window and then hit TAB twice, you'll see these:
Note the "dsenableroot" - if I want to give root a password so that I can actually login, I can do:
("apl" is an account with admin privileges)
That will ask me for my password, and then a password for "root". We don't need this (or even "sudo") to add "tom" to "uucp", but I thought I'd mention it in passing.
After reading the various man pages, it looks like "dseditgroup" is the right tool to use, but first I need to check to see if "tom" is already a member, and "dsmemberutil" seems to be the easy way to do that:
Continue reading this article.
|