site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Dec 28, 2007, at 13:18, Perry Smith wrote: Thank you, pedz #!/bin/bash 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/bahamut%40macstorm.org _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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. 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? # 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 This email sent to bahamut@macstorm.org This email sent to site_archiver@lists.apple.com