Ignore:
Timestamp:
Jul 30, 2011, 5:44:03 AM (9 years ago)
Author:
jmr@…
Message:

create run user with lowest available uid above 500, checking all data sources in the search path for existing users (#30464)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/Makefile.in

    r80335 r81414  
    5151            if test `id -u` -eq 0; then \
    5252                echo "Creating user \"${RUNUSR}\"" ; \
     53                NEXTUID=501; \
     54                while test -n "`dscl -q /Search -search /Users UniqueID $$NEXTUID`"; do \
     55                    let "NEXTUID=NEXTUID+1"; \
     56                done; \
     57                ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$NEXTUID ; \
    5358                ${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
    54                 ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$(($$(${DSCL} -q . -list /Users UniqueID | /usr/bin/awk '{print $$2}' | sort -ug | tail -1)+1)) ; \
    5559                ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
    5660                ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /var/empty ; \
Note: See TracChangeset for help on using the changeset viewer.