Here’s a little tip I use all the time, but have yet to commit to the blogosphere. If you’re trying to work on the Terminal command line in 10.6 or 10.5, it’s annoying to be prompted for your password to sudo every 5 minutes, and it gets confusing who’s running what commands. If you just type
and authenticate once, you’ll get a command prompt as root, without having to auth every few minutes. Just. Remember. To. Log. Out.
Apple’s latest offering, OS 10.5 “Leopard” offers GUI-based integration and account management for Microsoft Active Directory that is fairly full-featured and complete. However, as tends to be the case when it comes to enterprise-level account management, Apple dropped the ball and forgot to include a very important feature: the ability to promote a domain user to local administrative status without them having to log in. You can add groups through the Directory Utility GUI, but not individual users. Why would this be important? Well, at least for me, it’s because a lot of the users I support aren’t there when I’m setting up their computer, but they’ll need to administer it down the road. Getting their password in advance is a huge security no-no in an environment where pretty much everyone has sensitive data on their machine, so how can you give a user local admin privileges before their home folder is even created? Terminal, obviously.
- Launch Terminal from Applications->Utilities->Terminal.
- Type the following command, substituting the name of your domain user in the appropriate field, surrounded by quotation marks:
sudo dscl . -append /Groups/admin GroupMembership "new_user"
You’ll be prompted for your password, then you should see the command prompt again. If you’re not sure whether or not it worked, try promoting a domain account for which you have the password the same way and logging in. Go into System Preferences and try to unlock something. If your name appears in the username field, you’re an admin!