Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Resetting permissions on multiple user folders' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Resetting permissions on multiple user folders
Authored by: nicola on Apr 15, '03 05:09:43AM
You have already used nireport, so why not use niutil for getting a user's home directory? You may do something like

HomeDirLocation=`niutil -read . /users/$UserName | grep "home: " | sed 's/home\:\ //g'`

note: the above line is for the local domain; I don't have a server at hand, so I can't tell if "home: " (and the following "home\:\ ") will work for network domains too... (maybe not)

[ Reply to This | # ]
Resetting permissions on multiple user folders
Authored by: mithras on Apr 15, '03 08:23:37AM
What you want is:
HomeDir=`niutil -readprop / /users/$UserName home`

---
--
my free OS X applications and scripts

[ Reply to This | # ]

Resetting permissions on multiple user folders
Authored by: nicola on Apr 15, '03 10:20:57AM

Hey thanks!
Guess I should always read ALL the man page...

And: does anyone know if the "home" property is ok for OSX server too?



[ Reply to This | # ]