image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old April 28th, 2007, 03:33 AM
Sunnz's Avatar
Who wants a stylus?
 
Join Date: Nov 2005
Location: Canberra, Australia
Posts: 359
Thanks: 0
Thanked 0 Times in 0 Posts
Sunnz is on a distinguished road
How do I manage user & groups?

Ok so I need to create a new group and add an existing user (myself) to this group.

This is how I usually do it on a nix box:
groupadd -g 8080 mygroup
usermod -G mygroup myuser

But I can't find these commands on OS X...

I tried looking at System Preference but can't find anything like this, how do I manage users & groups on OS X?
__________________
[SIGPIC][/SIGPIC]

Catel - Core 2 Duo 2.0Ghz, 1GB Ram, OSX Tiger.8

AMDemon - Dual Opteron 2.6Ghz, 2GB Ram, FreeBSD 6.1
Reply With Quote
  #2  
Old April 28th, 2007, 04:03 AM
fryke's Avatar
Super Moderator
 
Join Date: Sep 2000
Location: macosx.com
Posts: 13,149
Thanks: 2
Thanked 12 Times in 12 Posts
fryke has a spectacular aura aboutfryke has a spectacular aura about
NetInfo Manager?
__________________
MacBook Air 13" 1.6 GHz, 2 GB RAM, 80 GB HD. Mac OS X 10.5.5
MacBook 13" 1.83 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.5
Hackintosh Core2Duo 2.4 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.5
iPhone 3G 16 GB (v2.1), AppleTV 1G 40 GB (v2.1)

Mac user since 1987, Apple Product Professional 2007, 2008.
Reply With Quote
  #3  
Old April 28th, 2007, 04:28 AM
Sunnz's Avatar
Who wants a stylus?
 
Join Date: Nov 2005
Location: Canberra, Australia
Posts: 359
Thanks: 0
Thanked 0 Times in 0 Posts
Sunnz is on a distinguished road
Hey thanks, NetInfo is... different!!
__________________
[SIGPIC][/SIGPIC]

Catel - Core 2 Duo 2.0Ghz, 1GB Ram, OSX Tiger.8

AMDemon - Dual Opteron 2.6Ghz, 2GB Ram, FreeBSD 6.1
Reply With Quote
  #4  
Old April 28th, 2007, 05:21 AM
fryke's Avatar
Super Moderator
 
Join Date: Sep 2000
Location: macosx.com
Posts: 13,149
Thanks: 2
Thanked 12 Times in 12 Posts
fryke has a spectacular aura aboutfryke has a spectacular aura about
I guess it's to freak out beginners.
__________________
MacBook Air 13" 1.6 GHz, 2 GB RAM, 80 GB HD. Mac OS X 10.5.5
MacBook 13" 1.83 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.5
Hackintosh Core2Duo 2.4 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.5
iPhone 3G 16 GB (v2.1), AppleTV 1G 40 GB (v2.1)

Mac user since 1987, Apple Product Professional 2007, 2008.
Reply With Quote
  #5  
Old April 28th, 2007, 05:28 AM
Sunnz's Avatar
Who wants a stylus?
 
Join Date: Nov 2005
Location: Canberra, Australia
Posts: 359
Thanks: 0
Thanked 0 Times in 0 Posts
Sunnz is on a distinguished road
Well I don't know, it feels like regedit on M$, but got that nix touch in it....
__________________
[SIGPIC][/SIGPIC]

Catel - Core 2 Duo 2.0Ghz, 1GB Ram, OSX Tiger.8

AMDemon - Dual Opteron 2.6Ghz, 2GB Ram, FreeBSD 6.1
Reply With Quote
  #6  
Old May 5th, 2007, 12:25 PM
Registered User
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
bartcatz is on a distinguished road
remember that the directory services store all user and group information. The traditional /etc/group etc are only used in single user mode.

so, you can use the dscl command to create and update groups from the command line (into the directory). such as:

dscl . create /groups/sunnz gid 1000
dscl . create /groups/sunnz passwd '*'
dscl . merge /groups/sunnz users user1 user2

above creates a group 'sunnz' with gid 1000 and adds user1 and user2 to it.

you can check your work in the netinfo manager with:

nidump group . | grep sunnz

Netinfo might be more straightforward!
Reply With Quote
  #7  
Old May 5th, 2007, 12:32 PM
Sunnz's Avatar
Who wants a stylus?
 
Join Date: Nov 2005
Location: Canberra, Australia
Posts: 359
Thanks: 0
Thanked 0 Times in 0 Posts
Sunnz is on a distinguished road
Yea Netinfo seems to be a bit easier...

I mean, what's dscl? Kind of counter-intuitive compared to groupadd and stuff.
__________________
[SIGPIC][/SIGPIC]

Catel - Core 2 Duo 2.0Ghz, 1GB Ram, OSX Tiger.8

AMDemon - Dual Opteron 2.6Ghz, 2GB Ram, FreeBSD 6.1
Reply With Quote
  #8  
Old May 5th, 2007, 12:42 PM
Registered User
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
bartcatz is on a distinguished road
object oriented mumbo jumbo! dscl is a generic interface for managing the data in the repository. I've used AIX, with it's odm, so I'm kinda used to it. but I use netinfo for this stuff...onry if I was automating a bunch of stuff would I use dscl. onesy twosey is too easy though gui.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 12:49 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.