Re: "Hidden" Users
Re: "Hidden" Users
- Subject: Re: "Hidden" Users
- From: Jean-Francois Roy <email@hidden>
- Date: Fri, 28 Dec 2007 14:34:11 -0500
I believe you should just keep the uid below 500. Pick a more or less
safe starting uid, for example starting at 300. This has worked fine
for me in situation similar to yours.
On Dec 28, 2007, at 13:18, Perry Smith wrote:
There are users such as _mysql, _www. They seem to be aliased to
mysql and www. They do not show up in the list of users you can
"fast switch" between. They also do not show up in the list of
accounts shows by System Preferences => Accounts.
I'm trying to create a postgres user. I've managed to do it with
the script attached. But, I am not clear what the magic is that
determines if it will be shown in these two places. I've managed,
at one point, to create a user that did not show up in Accounts but
did show up in the list of users you can fast switch between.
Does anyone know for sure what is used to determine the list of
users displayed in Accounts and the list of users displayed in the
fast user switching menu?
Thank you,
pedz
#!/bin/bash
# We loop to find a numeric value which is not a users uniqueid or a
groups
# primary group id starting at 501
typeset -i uid=501
while [[ "$( dscl . search Users UniqueID $uid &&
dscl . search Groups PrimaryGroupID $uid )" ]] ; do
let ++uid
done
dscl . create /Users/postgres
dscl . create /Users/postgres UniqueID $uid
dscl . create /Users/postgres PrimaryGroupID $uid
dscl . create /Users/postgres NFSHomeDirectory /Users/postgres
dscl . create /Users/postgres Password '*'
dscl . create /Users/postgres UserShell /bin/bash
dscl . create /Users/postgres RealName 'Postgres Admin User'
dscl . create /Groups/postgres
dscl . create /Groups/postgres PrimaryGroupID $uid
dscl . create /Users/postgres RealName 'Postgres Admin Group'
if [[ ! -d /Users/postgres ]] ; then
mkdir /Users/postgres
fi
chown -R postgres:postgres /Users/postgres
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden