hit counter
   
 

Random ramblings of a paranoid git
"The question is not if you are paranoid, it is if you are paranoid enough."


All | Security | Work | Wine & Dine | Leisure

   
   
20061003 Tuesday October 03, 2006
Changing your uid on Mac OS X
Permalink | | 2006-10-03 03:27

Since I'm going to turn my brand new Ultra 40 into a NFS server, I have to match the uid on Mac OS X with Solaris.

Being an UNIX geek, I immediately created a temporary admin account and ran sudo vi /etc/passwd only to be baffeled by the fact that the user martin wasn't there! Then I glanced at the comment at the top of the file. It turns out that /etc/passwd is only used when you boot into single user mode, instead I should be looking using the NetInfo program.

Once my uid and gid had been changed, I ran two onliners to change the user and group of all files and directories I own:

# find / -user 501 -print0 | xargs -0 chown -h martin
find: /dev/fd/3: Bad file descriptor
# find / -group 501 -print0 | xargs -0 chgrp -h martin
find: /dev/fd/3: Bad file descriptor
And I could log out of my temporary admin account and start using my normal account again.

   
 
Comments:

Post a Comment:

Comments are closed for this entry.
   
XML
« May 2008
SunMonTueWedThuFriSat
    
1
2
3
4
5
6
7
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today


Old entries


Bloggtoppen.se
OpenSolaris: Love at First Boot