|
Lines 40-45
Link Here
|
| 40 |
# key will be removed from these maps, allowing anyone to access them. |
40 |
# key will be removed from these maps, allowing anyone to access them. |
| 41 |
S=-s |
41 |
S=-s |
| 42 |
|
42 |
|
|
|
43 |
# If you want to have linux NIS clients you must enable this: |
| 44 |
# Comment the line if you have no linux NIS clients |
| 45 |
LINUXCOMPMODE=1 |
| 46 |
|
| 43 |
# These are commands which this Makefile needs to properly rebuild the |
47 |
# These are commands which this Makefile needs to properly rebuild the |
| 44 |
# NIS databases. Don't change these unless you have a good reason. Also |
48 |
# NIS databases. Don't change these unless you have a good reason. Also |
| 45 |
# be sure not to place an @ in front of /usr/bin/awk: it isn't necessary |
49 |
# be sure not to place an @ in front of /usr/bin/awk: it isn't necessary |
|
Lines 187-193
Link Here
|
| 187 |
publickey: publickey.byname |
191 |
publickey: publickey.byname |
| 188 |
aliases: mail.aliases |
192 |
aliases: mail.aliases |
| 189 |
|
193 |
|
| 190 |
master.passwd: master.passwd.byname master.passwd.byuid |
194 |
master.passwd: master.passwd.byname master.passwd.byuid shadow.byname |
| 191 |
|
195 |
|
| 192 |
# |
196 |
# |
| 193 |
# This is a special target used only when doing in-place updates with |
197 |
# This is a special target used only when doing in-place updates with |
|
Lines 460-465
Link Here
|
| 460 |
|
464 |
|
| 461 |
$(PASSWD): $(MASTER) |
465 |
$(PASSWD): $(MASTER) |
| 462 |
@echo "Creating new $@ file from $(MASTER)..." |
466 |
@echo "Creating new $@ file from $(MASTER)..." |
|
|
467 |
.if defined(LINUXCOMPMODE) |
| 468 |
@if [ ! $(UNSECURE) ]; then \ |
| 469 |
$(AWK) -F: '{if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ |
| 470 |
print $$1":x:"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ |
| 471 |
> $(PASSWD) ; \ |
| 472 |
else \ |
| 473 |
$(AWK) -F: '{if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ |
| 474 |
print $$1":"$$2":"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ |
| 475 |
> $(PASSWD) ; fi |
| 476 |
.else |
| 463 |
@if [ ! $(UNSECURE) ]; then \ |
477 |
@if [ ! $(UNSECURE) ]; then \ |
| 464 |
$(AWK) -F: '{if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ |
478 |
$(AWK) -F: '{if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ |
| 465 |
print $$1":*:"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ |
479 |
print $$1":*:"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ |
|
Lines 468-473
Link Here
|
| 468 |
$(AWK) -F: '{if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ |
482 |
$(AWK) -F: '{if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ |
| 469 |
print $$1":"$$2":"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ |
483 |
print $$1":"$$2":"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ |
| 470 |
> $(PASSWD) ; fi |
484 |
> $(PASSWD) ; fi |
|
|
485 |
.endif |
| 471 |
|
486 |
|
| 472 |
|
487 |
|
| 473 |
passwd.byname: $(PASSWD) |
488 |
passwd.byname: $(PASSWD) |
|
Lines 574-577
Link Here
|
| 574 |
@$(DBLOAD) -c |
589 |
@$(DBLOAD) -c |
| 575 |
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi |
590 |
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi |
| 576 |
@if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi |
591 |
@if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi |
|
|
592 |
|
| 593 |
|
| 594 |
shadow.byname: $(MASTER) |
| 595 |
.if defined(LINUXCOMPMODE) |
| 596 |
@echo "Updating $@..." |
| 597 |
.if ${MASTER} == "/dev/null" |
| 598 |
@echo "Master.passwd source file not found -- skipping" |
| 599 |
.else |
| 600 |
@cat $(MASTER) | \ |
| 601 |
$(AWK) -F: '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ |
| 602 |
print $$1"\t"$$1":"$$2":::::::" }' $^ \ |
| 603 |
| $(DBLOAD) ${S} -f -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP); \ |
| 604 |
$(RMV) $(TMP) $@ |
| 605 |
@$(DBLOAD) -c |
| 606 |
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi |
| 607 |
@if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi |
| 608 |
.endif |
| 609 |
.endif |