[macosx-unix] mac serial number...

Isaac Levy ike at lesmuug.org
Mon Dec 3 20:17:52 EST 2007


On Dec 3, 2007, at 8:07 PM, Brian Redman wrote:

> On Dec 3, 2007, at 6:25 PM, George Georgalis wrote:
>
>> Hi all!
>>
>> Is there a way to determine the serial number for
>> a Jaguar/panther mac from the command line? I'd
>> like to write a script to mail mac addresses, host
>> names and serial numbers from the MacBooks at our
>> office. I guess finding the full names and login
>> names of system users would be good to collect too.
>
> If we can assume the system user is uid 501 then:
>
> $ nicl . -search /users 0 1 uid 501
>
> will tell you the "name" and "realname" on 10.3  Don't know about  
> 10.2.
>
> 	ber

Sidenote for Leapord, there seems to be no more nicl:

nicl . -search /users 0 1 uid 501
-bash: nicl: command not found
plumb:~ ike$ whereis nicl
plumb:~ ike$

However, there IS a very comprehensive man page:

plumb:~ ike$ man nicl
--
nicl(1)                   BSD General Commands Manual                   
nicl(1)

NAME
      nicl -- NetInfo command line utility

SYNOPSIS
      nicl [options] datasource [command]

           options:
                 -c           create new datasource
                 -ro          read-only
                 -p           prompt for password
                 -u user      authenticate as user
                 -P password  authentication password
                 -raw         datasource is a NetInfo directory
                 -t           datasource is host/tag
                 -v           verbose output
                 -q           quiet - no interactive prompt
                 -i           Ask for confirmation before deleting  
directories
                 -x500        X.500 names

           commands:
                 -read dir [key ...]
                 -list dir [key]
                 -search dir scopemin scopemax key val [key val] ...
<snip>



Rocket-
.ike




More information about the macosx-unix mailing list