image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
LinkBack Thread Tools
  #1  
Old October 10th, 2002, 07:48 PM
Registered User
 
Join Date: Sep 2001
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
johnnyb is on a distinguished road
Question OSX numeric UIDs - any control over them?

Hello All

Couple quick questions:

* Is there any way to specify a numeric UID and/org GID at user creation time?

* Is there any sane way to change a UID after a user has been created? I've tried modifying in netinfo, with generally incomplete results...

* Can the normal BSD user/group utilities (if present) be used in conjunction with the OSX tools?

I'd like to be able to share our NFS resources properly on the Mac so the UIDs must match. I'd rather shoehorn the Mac in than modify our current settings on the network.

Thanks - any help (especially with the 1st quest.) appreciated!

JB
Reply With Quote
  #2  
Old October 11th, 2002, 10:40 AM
Defender of the Realm
 
Join Date: Jun 2001
Location: nyc
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
alexrd is on a distinguished road
Re: OSX numeric UIDs - any control over them?

Quote:
Originally posted by johnnyb
Hello All

Couple quick questions:

* Is there any way to specify a numeric UID and/org GID at user creation time?
In OSX Server: yes, in client: no.

Quote:

* Is there any sane way to change a UID after a user has been created? I've tried modifying in netinfo, with generally incomplete results...
You had the right idea. Change it in netinfo manager. The one caveat is that you then have to go and chown the home directory, becuase it will still be owned by the old UID. (make sure to use chown -R). I've done this many times on the systems I manage, I'm not sure why it would be "incomplete"...

Quote:

* Can the normal BSD user/group utilities (if present) be used in conjunction with the OSX tools?
Sort of. You can edit the normal BSD /etc files, but then you have to run niload to suck the info into the netinfo db.
man niload
man niload
man niload...
(Aslo, for completeness, "man nidump" which goes in the other direction)
So if you aquired or wrote an add_user script that editied /etc/passwd, it would be possible to transfer those changes into netinfo.

Quote:
I'd like to be able to share our NFS resources properly on the Mac so the UIDs must match. I'd rather shoehorn the Mac in than modify our current settings on the network.
What OS is serving NFS? Some systems will let you remap users on the server side (with a directive /etc/exports like map_all=joe_user). That may not be what you want, but I thought I'd mention it. Have you looked as using NIS? I haven't actually tried it, but OSX can supposedly act as a yp-client. That would give you a central point of administration without having to manually edit your UIDs. If you want to give yourself even more to do, you could run an LDAP server on your NFS server and pick up the user info that way. (the difficulty of that project on various UNICES varies from pain-in-the-ass to downright impossible).

Hope this helps....

-alex.
__________________
Beige G3 desktop w/500MHz G4 ZIF
768 MB RAM, PCI Radeon & USB/Firewire
-
TiBook 550MHz 256MB DVD
-
Mac OS X 10.2.4(6I32) on each.
----
PIII500/128MB workhorse running NetBSD 1.6
----
All sorts of Suns and SGIs running all sorts of UNIXy OSes...
Reply With Quote
  #3  
Old October 11th, 2002, 10:53 AM
Registered User
 
Join Date: Sep 2001
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
johnnyb is on a distinguished road
Re: Re: OSX numeric UIDs - any control over them?

Quote:
Originally posted by alexrd

<snip>
* Is there any sane way to change a UID after a user has been created? I've tried modifying in netinfo, with generally incomplete results...

You had the right idea. Change it in netinfo manager. The one caveat is that you then have to go and chown the home directory, becuase it will still be owned by the old UID. (make sure to use chown -R). I've done this many times on the systems I manage, I'm not sure why it would be "incomplete"...
It was 'incomplete' because I chose not to chown -R the directories. I wasn't sure if I should treat it like a Unix box of if there existed an 'OSX' way to do it.


Quote:
* Can the normal BSD user/group utilities (if present) be used in conjunction with the OSX tools?


Sort of. You can edit the normal BSD /etc files, but then you have to run niload to suck the info into the netinfo db.
man niload
man niload
man niload...
(Aslo, for completeness, "man nidump" which goes in the other direction)
So if you aquired or wrote an add_user script that editied /etc/passwd, it would be possible to transfer those changes into netinfo.
I'll read the man page for both. Sounds enlightening (didn't know they existed)..

Quote:
<snip>


What OS is serving NFS? Some systems will let you remap users on the server side (with a directive /etc/exports like map_all=joe_user). That may not be what you want, but I thought I'd mention it. Have you looked as using NIS? I haven't actually tried it, but OSX can supposedly act as a yp-client. That would give you a central point of administration without having to manually edit your UIDs. If you want to give yourself even more to do, you could run an LDAP server on your NFS server and pick up the user info that way. (the difficulty of that project on various UNICES varies from pain-in-the-ass to downright impossible).

Hope this helps....

-alex.
The NFS serving opsys is linux and occassionally FreeBSD. I moved from AFS to NFS last year for simplicity's sake. (AFS is a lot of work for 5 boxes ;-) I've been meaning to check out LDAP, I may look into it. For now it's been less of a headache to just admin the clients since there are really on 4 accounts to handle.

Thanks for the info - I'll make the mods in netinfo, chown the proper directories and then check out the 'ni*' tools to see what they do.

Thanks - JB
Reply With Quote
Reply

Bookmarks

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is Java STILL bad in OSX? DrHogie Mac OS X System & Mac Software 10 June 19th, 2002 08:13 AM
Mac OSX 10.1.4 & Microsoft Intellieye OSX Mouse drivers JeffCGD Mac OS X System & Mac Software 6 April 27th, 2002 07:04 AM
OSX shut me out! cutter Mac OS X System & Mac Software 8 March 4th, 2002 02:03 PM
linux vs OSX performance comparissons? spike Apple News, Rumors & Discussion 10 April 28th, 2001 04:52 AM


All times are GMT -5. The time now is 09:36 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.