Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet » StarterPak/!Newsbase/Transports/taylor/moduser » Compare
Compare StarterPak/!Newsbase/Transports/taylor/moduser with StarterPak/!Newsbase/Transports/taylor/adduser
| File: | Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet » StarterPak/!Newsbase/Transports/taylor/moduser |
| Compared with: | Archimedes archive » Acorn User » AU 1995-08.adf » !Internet » StarterPak/!Newsbase/Transports/taylor/adduser |
| Similarity: | 65% of bytes duplicated |
64.8% of the bytes in these files are duplicated between them. Duplicated Different Padding (ignored)
Bytes are marked as duplicated if they lie within a run of at least 16 bytes which also appears somewhere in the other file, in any position. Long runs of padding bytes
(zeros, spaces, &FF and &E5) are ignored.
StarterPak/!Newsbase/Transports/taylor/moduser
00000000 0d 00 0a 0e f4 20 3e 6d 6f 64 75 73 65 72 0d 00 |..... >moduser..| 00000010 14 3d f4 20 6d 6f 64 69 66 79 20 61 20 75 73 65 |.=. modify a use| 00000020 72 20 74 6f 20 74 68 65 20 2f 65 74 63 2f 70 61 |r to the /etc/pa| 00000030 73 73 77 64 20 66 69 6c 65 2c 20 77 68 65 72 65 |sswd file, where| 00000040 65 76 65 72 20 69 74 20 69 73 2e 0d 00 1e 05 f4 |ever it is......| 00000050 0d 00 28 21 f4 20 41 75 74 68 6f 72 3a 20 20 20 |..(!. Author: | 00000060 20 20 20 20 20 20 47 75 6e 6e 61 72 20 5a f6 74 | Gunnar Z.t| 00000070 6c 0d 00 32 21 f4 20 44 61 74 65 3a 20 20 20 20 |l..2!. Date: | 00000080 20 20 20 20 20 20 20 31 30 2d 4e 6f 76 2d 31 39 | 10-Nov-19| 00000090 39 34 0d 00 3c 21 f4 20 4c 61 73 74 20 6d 6f 64 |94..<!. Last mod| 000000a0 69 66 69 65 64 3a 20 20 31 35 2d 44 65 63 2d 31 |ified: 15-Dec-1| 000000b0 39 39 34 0d 00 46 04 0d 00 50 19 ee 85 20 f6 3a |994..F...P... .:| 000000c0 f1 22 20 61 74 20 6c 69 6e 65 20 22 3b 9e 3a e0 |." at line ";.:.| 000000d0 0d 00 5a 04 0d 00 64 27 c8 9b 20 22 3c 4e 65 77 |..Z...d'.. "<New| 000000e0 73 42 61 73 65 24 54 61 79 6c 6f 72 44 69 72 3e |sBase$TaylorDir>| 000000f0 2e 53 63 72 69 70 74 4c 69 62 22 0d 00 6e 04 0d |.ScriptLib"..n..| 00000100 00 78 1d f4 20 64 65 66 61 75 6c 74 20 76 61 6c |.x.. default val| 00000110 75 65 20 66 6f 72 20 67 72 6f 75 70 0d 00 82 0c |ue for group....| 00000120 47 52 50 25 20 3d 20 31 0d 00 8c 04 0d 00 96 21 |GRP% = 1.......!| 00000130 f4 20 67 65 74 20 63 6f 6d 6d 61 6e 64 20 6c 69 |. get command li| 00000140 6e 65 20 70 61 72 61 6d 65 74 65 72 73 0d 00 a0 |ne parameters...| 00000150 0a f2 65 6e 74 72 79 0d 00 aa 1f e7 20 28 61 72 |..entry..... (ar| 00000160 67 63 20 3d 20 33 29 20 84 20 28 61 72 67 63 20 |gc = 3) . (argc | 00000170 3d 20 35 29 20 8c 0d 00 b4 19 20 20 20 20 e3 20 |= 5) ..... . | 00000180 69 25 3d 31 20 b8 20 61 72 67 63 20 2d 20 31 0d |i%=1 . argc - 1.| 00000190 00 be 1a 20 20 20 20 20 20 20 20 c8 8e 20 61 72 |... .. ar| 000001a0 67 76 24 28 69 25 29 20 ca 0d 00 c8 33 20 20 20 |gv$(i%) ....3 | 000001b0 20 20 20 20 20 20 20 20 20 c9 20 22 2d 75 22 3a | . "-u":| 000001c0 20 4e 24 20 3d 20 61 72 67 76 24 28 69 25 20 2b | N$ = argv$(i% +| 000001d0 20 31 29 3a 20 69 25 20 2b 3d 20 31 0d 00 d2 38 | 1): i% += 1...8| 000001e0 20 20 20 20 20 20 20 20 20 20 20 20 c9 20 22 2d | . "-| 000001f0 67 22 3a 20 47 52 50 25 20 3d 20 bb 28 61 72 67 |g": GRP% = .(arg| 00000200 76 24 28 69 25 20 2b 20 31 29 29 3a 20 69 25 20 |v$(i% + 1)): i% | 00000210 2b 3d 20 31 0d 00 dc 2f 20 20 20 20 20 20 20 20 |+= 1.../ | 00000220 20 20 20 20 7f 20 f2 65 78 69 74 28 31 2c 20 22 | . .exit(1, "| 00000230 49 6e 76 61 6c 69 64 20 50 61 72 61 6d 65 74 65 |Invalid Paramete| 00000240 72 22 29 0d 00 e6 0d 20 20 20 20 20 20 20 20 cb |r").... .| 00000250 0d 00 f0 0c 20 20 20 20 ed 20 69 25 0d 00 fa 05 |.... . i%....| 00000260 cd 0d 01 04 04 0d 01 0e 22 f4 20 72 65 6d 6f 76 |........". remov| 00000270 65 20 73 70 61 63 65 73 20 66 72 6f 6d 20 75 73 |e spaces from us| 00000280 65 72 6e 61 6d 65 2e 0d 01 18 1c 75 73 65 72 24 |ername.....user$| 00000290 20 3d 20 a4 73 74 72 69 70 73 70 61 63 65 73 28 | = .stripspaces(| 000002a0 4e 24 29 0d 01 22 21 75 73 65 72 24 20 3d 20 a4 |N$).."!user$ = .| 000002b0 74 6f 6c 6f 77 65 72 28 75 73 65 72 24 29 20 2b |tolower(user$) +| 000002c0 20 22 3a 22 0d 01 2c 13 6c 65 6e 25 20 3d 20 a9 | ":"..,.len% = .| 000002d0 28 75 73 65 72 24 29 0d 01 36 04 0d 01 40 25 e7 |(user$)..6...@%.| 000002e0 20 a4 67 65 74 65 6e 76 28 22 57 69 6d 70 24 53 | .getenv("Wimp$S| 000002f0 63 72 61 70 44 69 72 22 29 20 3d 20 22 22 20 8c |crapDir") = "" .| 00000300 0d 01 4a 30 20 20 20 20 f2 65 78 69 74 28 30 2c |..J0 .exit(0,| 00000310 20 22 53 63 72 61 70 44 69 72 20 6d 75 73 74 20 | "ScrapDir must | 00000320 68 61 76 65 20 62 65 65 6e 20 73 65 65 6e 22 29 |have been seen")| 00000330 0d 01 54 05 cd 0d 01 5e 26 65 74 63 70 61 73 73 |..T....^&etcpass| 00000340 77 64 24 20 3d 20 a4 75 70 61 74 68 28 22 2f 65 |wd$ = .upath("/e| 00000350 74 63 2f 70 61 73 73 77 64 22 29 0d 01 68 32 65 |tc/passwd")..h2e| 00000360 74 63 62 70 61 73 73 77 64 24 20 3d 20 a4 75 70 |tcbpasswd$ = .up| 00000370 61 74 68 28 22 3c 57 69 6d 70 24 53 63 72 61 70 |ath("<Wimp$Scrap| 00000380 44 69 72 3e 2e 70 61 73 73 77 64 22 29 0d 01 72 |Dir>.passwd")..r| 00000390 04 0d 01 7c 3e f4 20 77 65 20 63 6f 70 79 20 66 |...|>. we copy f| 000003a0 72 6f 6d 20 2f 65 74 63 2f 70 61 73 73 77 64 20 |rom /etc/passwd | 000003b0 74 6f 20 74 68 65 20 74 65 6d 70 2e 20 66 69 6c |to the temp. fil| 000003c0 65 20 75 6e 74 69 6c 20 77 65 20 66 69 6e 64 0d |e until we find.| 000003d0 01 86 3e f4 20 74 68 65 20 73 70 65 63 69 66 69 |..>. the specifi| 000003e0 65 64 20 75 73 65 72 2e 20 54 68 65 6e 20 77 65 |ed user. Then we| 000003f0 20 6a 75 73 74 20 61 6c 74 65 72 20 68 69 73 20 | just alter his | 00000400 67 72 6f 75 70 20 6e 75 6d 62 65 72 2c 0d 01 90 |group number,...| 00000410 34 f4 20 61 6e 64 20 77 72 69 74 65 20 74 68 65 |4. and write the| 00000420 20 6e 65 77 20 65 6e 74 72 79 20 6f 75 74 20 74 | new entry out t| 00000430 6f 20 74 68 65 20 74 65 6d 70 2e 20 66 69 6c 65 |o the temp. file| 00000440 2e 0d 01 9a 17 69 66 25 20 3d 20 8e 28 65 74 63 |.....if% = .(etc| 00000450 70 61 73 73 77 64 24 29 0d 01 a4 36 e7 20 69 66 |passwd$)...6. if| 00000460 25 20 3d 20 30 20 8c 20 f2 65 78 69 74 28 31 2c |% = 0 . .exit(1,| 00000470 20 22 63 6f 75 6c 64 20 6e 6f 74 20 6f 70 65 6e | "could not open| 00000480 20 2f 65 74 63 2f 70 61 73 73 77 64 22 29 0d 01 | /etc/passwd")..| 00000490 ae 18 6f 66 25 20 3d 20 ae 28 65 74 63 62 70 61 |..of% = .(etcbpa| 000004a0 73 73 77 64 24 29 0d 01 b8 39 e7 20 6f 66 25 20 |sswd$)...9. of% | 000004b0 3d 20 30 20 8c 20 f2 65 78 69 74 28 31 2c 20 22 |= 0 . .exit(1, "| 000004c0 63 6f 75 6c 64 20 6e 6f 74 20 6f 70 65 6e 20 22 |could not open "| 000004d0 20 2b 20 65 74 63 62 70 61 73 73 77 64 24 29 0d | + etcbpasswd$).| 000004e0 01 c2 0a 69 25 20 3d 20 30 0d 01 cc 0a 6a 25 20 |...i% = 0....j% | 000004f0 3d 20 30 0d 01 d6 05 f5 0d 01 e0 12 20 20 20 20 |= 0......... | 00000500 63 24 20 3d 20 be 23 69 66 25 0d 01 ea 1e 20 20 |c$ = .#if%.... | 00000510 20 20 e7 20 c0 63 24 2c 20 6c 65 6e 25 29 20 3d | . .c$, len%) =| 00000520 20 75 73 65 72 24 20 8c 0d 01 f4 1a 20 20 20 20 | user$ ..... | 00000530 20 20 20 20 69 25 20 3d 20 a7 63 24 2c 20 22 3a | i% = .c$, ":| 00000540 22 29 0d 01 fe 22 20 20 20 20 20 20 20 20 69 25 |")..." i%| 00000550 20 3d 20 a7 63 24 2c 20 22 3a 22 2c 20 69 25 20 | = .c$, ":", i% | 00000560 2b 20 31 29 0d 02 08 3b 20 20 20 20 20 20 20 20 |+ 1)...; | 00000570 f4 20 65 78 74 72 61 63 74 20 73 74 72 69 6e 67 |. extract string| 00000580 73 20 62 65 66 6f 72 65 20 61 6e 64 20 61 66 74 |s before and aft| 00000590 65 72 20 67 72 6f 75 70 20 6e 75 6d 62 65 72 0d |er group number.| 000005a0 02 12 22 20 20 20 20 20 20 20 20 69 25 20 3d 20 |.." i% = | 000005b0 a7 63 24 2c 20 22 3a 22 2c 20 69 25 20 2b 20 31 |.c$, ":", i% + 1| 000005c0 29 0d 02 1c 22 20 20 20 20 20 20 20 20 6a 25 20 |)..." j% | 000005d0 3d 20 a7 63 24 2c 20 22 3a 22 2c 20 69 25 20 2b |= .c$, ":", i% +| 000005e0 20 31 29 0d 02 26 2c 20 20 20 20 20 20 20 20 6f | 1)..&, o| 000005f0 24 3d c0 63 24 2c 20 69 25 29 20 2b 20 c3 28 47 |$=.c$, i%) + .(G| 00000600 52 50 25 29 20 2b 20 c1 63 24 2c 20 6a 25 29 0d |RP%) + .c$, j%).| 00000610 02 30 15 20 20 20 20 20 20 20 20 d5 20 23 6f 66 |.0. . #of| 00000620 25 2c 6f 24 0d 02 3a 09 20 20 20 20 cc 0d 02 44 |%,o$..:. ...D| 00000630 15 20 20 20 20 20 20 20 20 d5 20 23 6f 66 25 2c |. . #of%,| 00000640 63 24 0d 02 4e 09 20 20 20 20 cd 0d 02 58 0d fd |c$..N. ...X..| 00000650 20 28 63 24 3d 22 22 29 0d 02 62 0a d9 20 23 6f | (c$="")..b.. #o| 00000660 66 25 0d 02 6c 0a d9 20 23 69 66 25 0d 02 76 04 |f%..l.. #if%..v.| 00000670 0d 02 80 0e e7 20 69 25 20 3e 20 30 20 8c 0d 02 |..... i% > 0 ...| 00000680 8a 43 20 20 20 20 f4 20 6e 6f 77 20 63 6f 70 79 |.C . now copy| 00000690 20 6f 75 72 20 6e 65 77 20 66 69 6c 65 20 6f 76 | our new file ov| 000006a0 65 72 20 74 68 65 20 6f 6c 64 20 6f 6e 65 20 74 |er the old one t| 000006b0 68 65 6e 20 65 78 69 74 20 61 6e 64 20 74 65 6c |hen exit and tel| 000006c0 6c 0d 02 94 26 20 20 20 20 f4 20 4e 65 77 73 42 |l...& . NewsB| 000006d0 61 73 65 20 74 68 61 74 20 61 6c 6c 20 77 65 6e |ase that all wen| 000006e0 74 20 66 69 6e 65 2e 0d 02 9e 2b 20 20 20 20 ff |t fine....+ .| 000006f0 28 22 73 65 74 74 79 70 65 20 22 20 2b 65 74 63 |("settype " +etc| 00000700 62 70 61 73 73 77 64 24 20 2b 20 22 20 46 46 46 |bpasswd$ + " FFF| 00000710 22 29 0d 02 a8 3f 20 20 20 20 ff 28 22 63 6f 70 |")...? .("cop| 00000720 79 20 22 20 2b 20 65 74 63 62 70 61 73 73 77 64 |y " + etcbpasswd| 00000730 24 20 2b 20 22 20 22 20 2b 20 65 74 63 70 61 73 |$ + " " + etcpas| 00000740 73 77 64 24 20 2b 20 22 20 46 44 7e 43 7e 56 22 |swd$ + " FD~C~V"| 00000750 29 0d 02 b2 2f 20 20 20 20 f2 65 78 69 74 28 30 |).../ .exit(0| 00000760 2c 20 22 75 73 65 72 20 22 20 2b 20 75 73 65 72 |, "user " + user| 00000770 24 20 2b 20 22 20 6d 6f 64 69 66 69 65 64 22 29 |$ + " modified")| 00000780 0d 02 bc 05 cc 0d 02 c6 25 20 20 20 20 f4 20 6f |........% . o| 00000790 74 68 65 72 77 69 73 65 20 63 6f 6d 70 6c 61 69 |therwise complai| 000007a0 6e 20 61 6e 64 20 64 69 65 2e 0d 02 d0 30 20 20 |n and die....0 | 000007b0 20 20 f2 65 78 69 74 28 31 2c 20 22 75 73 65 72 | .exit(1, "user| 000007c0 20 22 20 2b 20 75 73 65 72 24 20 2b 20 22 20 6e | " + user$ + " n| 000007d0 6f 74 20 66 6f 75 6e 64 22 29 0d 02 da 05 cd 0d |ot found")......| 000007e0 02 e4 05 e0 0d 02 ee 04 0d 02 f8 36 f4 20 63 6f |...........6. co| 000007f0 6e 76 65 72 74 20 61 6c 6c 20 63 68 61 72 61 63 |nvert all charac| 00000800 74 65 72 73 20 69 6e 20 61 20 73 74 72 69 6e 67 |ters in a string| 00000810 20 74 6f 20 6c 6f 77 65 72 63 61 73 65 2e 0d 03 | to lowercase...| 00000820 02 05 f4 0d 03 0c 12 dd 20 a4 74 6f 6c 6f 77 65 |........ .tolowe| 00000830 72 28 61 24 29 0d 03 16 0c ea 20 69 25 2c 20 63 |r(a$)..... i%, c| 00000840 24 0d 03 20 12 e3 20 69 25 20 3d 20 31 20 b8 20 |$.. .. i% = 1 . | 00000850 a9 61 24 0d 03 2a 18 20 20 20 20 63 24 20 3d 20 |.a$..*. c$ = | 00000860 c1 61 24 2c 20 69 25 2c 20 31 29 0d 03 34 21 20 |.a$, i%, 1)..4! | 00000870 20 20 20 e7 20 63 24 20 3e 3d 20 22 41 22 20 80 | . c$ >= "A" .| 00000880 20 63 24 20 3c 3d 20 22 5a 22 20 8c 0d 03 3e 2a | c$ <= "Z" ...>*| 00000890 20 20 20 20 20 20 20 20 c1 61 24 2c 20 69 25 2c | .a$, i%,| 000008a0 20 31 29 20 3d 20 bd 28 97 28 63 24 29 20 2b 20 | 1) = .(.(c$) + | 000008b0 63 64 69 66 66 29 0d 03 48 09 20 20 20 20 cd 0d |cdiff)..H. ..| 000008c0 03 52 08 3d 20 61 24 0d 03 5c 04 0d 03 66 31 f4 |.R.= a$..\...f1.| 000008d0 20 65 78 69 74 20 66 72 6f 6d 20 68 65 72 65 2c | exit from here,| 000008e0 20 72 65 74 75 72 6e 69 6e 67 20 61 70 70 72 6f | returning appro| 000008f0 70 72 69 61 74 65 20 69 6e 66 6f 2e 0d 03 70 05 |priate info...p.| 00000900 f4 0d 03 7a 11 dd f2 65 78 69 74 28 6e 25 2c 61 |...z...exit(n%,a| 00000910 24 29 0d 03 84 25 ff 28 22 73 65 74 20 4e 65 77 |$)...%.("set New| 00000920 73 42 61 73 65 24 52 65 74 75 72 6e 43 6f 64 65 |sBase$ReturnCode| 00000930 20 22 2b c3 6e 25 29 0d 03 8e 24 ff 28 22 73 65 | "+.n%)...$.("se| 00000940 74 20 4e 65 77 73 42 61 73 65 24 52 65 74 75 72 |t NewsBase$Retur| 00000950 6e 49 6e 66 6f 20 22 2b 61 24 29 0d 03 98 05 e0 |nInfo "+a$).....| 00000960 0d 03 a2 05 e1 0d ff |.......| 00000967
StarterPak/!Newsbase/Transports/taylor/adduser
00000000 0d 00 0a 0e f4 20 3e 61 64 64 75 73 65 72 0d 00 |..... >adduser..| 00000010 14 3a f4 20 61 64 64 20 61 20 75 73 65 72 20 74 |.:. add a user t| 00000020 6f 20 74 68 65 20 2f 65 74 63 2f 70 61 73 73 77 |o the /etc/passw| 00000030 64 20 66 69 6c 65 2c 20 77 68 65 72 65 65 76 65 |d file, whereeve| 00000040 72 20 69 74 20 69 73 2e 0d 00 1e 05 f4 0d 00 28 |r it is........(| 00000050 21 f4 20 41 75 74 68 6f 72 3a 20 20 20 20 20 20 |!. Author: | 00000060 20 20 20 47 75 6e 6e 61 72 20 5a f6 74 6c 0d 00 | Gunnar Z.tl..| 00000070 32 21 f4 20 44 61 74 65 3a 20 20 20 20 20 20 20 |2!. Date: | 00000080 20 20 20 20 31 38 2d 53 65 70 2d 31 39 39 34 0d | 18-Sep-1994.| 00000090 00 3c 21 f4 20 4c 61 73 74 20 6d 6f 64 69 66 69 |.<!. Last modifi| 000000a0 65 64 3a 20 20 30 36 2d 4e 6f 76 2d 31 39 39 34 |ed: 06-Nov-1994| 000000b0 0d 00 46 04 0d 00 50 19 ee 85 20 f6 3a f1 22 20 |..F...P... .:." | 000000c0 61 74 20 6c 69 6e 65 20 22 3b 9e 3a e0 0d 00 5a |at line ";.:...Z| 000000d0 04 0d 00 64 27 c8 9b 20 22 3c 4e 65 77 73 42 61 |...d'.. "<NewsBa| 000000e0 73 65 24 54 61 79 6c 6f 72 44 69 72 3e 2e 53 63 |se$TaylorDir>.Sc| 000000f0 72 69 70 74 4c 69 62 22 0d 00 6e 04 0d 00 78 1d |riptLib"..n...x.| 00000100 f4 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 20 |. default value | 00000110 66 6f 72 20 67 72 6f 75 70 0d 00 82 0c 47 52 50 |for group....GRP| 00000120 25 20 3d 20 31 0d 00 8c 04 0d 00 96 21 f4 20 67 |% = 1.......!. g| 00000130 65 74 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 |et command line | 00000140 70 61 72 61 6d 65 74 65 72 73 0d 00 a0 0a f2 65 |parameters.....e| 00000150 6e 74 72 79 0d 00 aa 1f e7 20 28 61 72 67 63 20 |ntry..... (argc | 00000160 3d 20 33 29 20 84 20 28 61 72 67 63 20 3d 20 35 |= 3) . (argc = 5| 00000170 29 20 8c 0d 00 b4 19 20 20 20 20 e3 20 69 25 3d |) ..... . i%=| 00000180 31 20 b8 20 61 72 67 63 20 2d 20 31 0d 00 be 1a |1 . argc - 1....| 00000190 20 20 20 20 20 20 20 20 c8 8e 20 61 72 67 76 24 | .. argv$| 000001a0 28 69 25 29 20 ca 0d 00 c8 33 20 20 20 20 20 20 |(i%) ....3 | 000001b0 20 20 20 20 20 20 c9 20 22 2d 75 22 3a 20 4e 24 | . "-u": N$| 000001c0 20 3d 20 61 72 67 76 24 28 69 25 20 2b 20 31 29 | = argv$(i% + 1)| 000001d0 3a 20 69 25 20 2b 3d 20 31 0d 00 d2 38 20 20 20 |: i% += 1...8 | 000001e0 20 20 20 20 20 20 20 20 20 c9 20 22 2d 67 22 3a | . "-g":| 000001f0 20 47 52 50 25 20 3d 20 bb 28 61 72 67 76 24 28 | GRP% = .(argv$(| 00000200 69 25 20 2b 20 31 29 29 3a 20 69 25 20 2b 3d 20 |i% + 1)): i% += | 00000210 31 0d 00 dc 2f 20 20 20 20 20 20 20 20 20 20 20 |1.../ | 00000220 20 7f 20 f2 65 78 69 74 28 31 2c 20 22 49 6e 76 | . .exit(1, "Inv| 00000230 61 6c 69 64 20 50 61 72 61 6d 65 74 65 72 22 29 |alid Parameter")| 00000240 0d 00 e6 0d 20 20 20 20 20 20 20 20 cb 0d 00 f0 |.... ....| 00000250 0c 20 20 20 20 ed 20 69 25 0d 00 fa 05 cd 0d 01 |. . i%.......| 00000260 04 04 0d 01 0e 22 f4 20 72 65 6d 6f 76 65 20 73 |.....". remove s| 00000270 70 61 63 65 73 20 66 72 6f 6d 20 75 73 65 72 6e |paces from usern| 00000280 61 6d 65 2e 0d 01 18 1c 75 73 65 72 24 20 3d 20 |ame.....user$ = | 00000290 a4 73 74 72 69 70 73 70 61 63 65 73 28 4e 24 29 |.stripspaces(N$)| 000002a0 0d 01 22 21 75 73 65 72 24 20 3d 20 a4 74 6f 6c |.."!user$ = .tol| 000002b0 6f 77 65 72 28 75 73 65 72 24 29 20 2b 20 22 3a |ower(user$) + ":| 000002c0 22 0d 01 2c 13 6c 65 6e 25 20 3d 20 a9 28 75 73 |"..,.len% = .(us| 000002d0 65 72 24 29 0d 01 36 04 0d 01 40 25 e7 20 a4 67 |er$)..6...@%. .g| 000002e0 65 74 65 6e 76 28 22 57 69 6d 70 24 53 63 72 61 |etenv("Wimp$Scra| 000002f0 70 44 69 72 22 29 20 3d 20 22 22 20 8c 0d 01 4a |pDir") = "" ...J| 00000300 30 20 20 20 20 f2 65 78 69 74 28 30 2c 20 22 53 |0 .exit(0, "S| 00000310 63 72 61 70 44 69 72 20 6d 75 73 74 20 68 61 76 |crapDir must hav| 00000320 65 20 62 65 65 6e 20 73 65 65 6e 22 29 0d 01 54 |e been seen")..T| 00000330 05 cd 0d 01 5e 26 65 74 63 70 61 73 73 77 64 24 |....^&etcpasswd$| 00000340 20 3d 20 a4 75 70 61 74 68 28 22 2f 65 74 63 2f | = .upath("/etc/| 00000350 70 61 73 73 77 64 22 29 0d 01 68 32 65 74 63 62 |passwd")..h2etcb| 00000360 70 61 73 73 77 64 24 20 3d 20 a4 75 70 61 74 68 |passwd$ = .upath| 00000370 28 22 3c 57 69 6d 70 24 53 63 72 61 70 44 69 72 |("<Wimp$ScrapDir| 00000380 3e 2e 70 61 73 73 77 64 22 29 0d 01 72 04 0d 01 |>.passwd")..r...| 00000390 7c 41 f4 20 66 69 72 73 74 20 77 65 20 64 65 74 ||A. first we det| 000003a0 65 72 6d 69 6e 65 20 74 68 65 20 6c 65 6e 67 74 |ermine the lengt| 000003b0 68 20 6f 66 20 2f 65 74 63 2f 70 61 73 73 64 20 |h of /etc/passd | 000003c0 61 6e 64 20 74 68 65 20 68 69 67 68 65 73 74 0d |and the highest.| 000003d0 01 86 19 f4 20 75 73 65 72 20 6e 75 6d 62 65 72 |.... user number| 000003e0 20 73 6f 20 66 61 72 2e 0d 01 90 17 69 66 25 20 | so far.....if% | 000003f0 3d 20 8e 28 65 74 63 70 61 73 73 77 64 24 29 0d |= .(etcpasswd$).| 00000400 01 9a 36 e7 20 69 66 25 20 3d 20 30 20 8c 20 f2 |..6. if% = 0 . .| 00000410 65 78 69 74 28 31 2c 20 22 63 6f 75 6c 64 20 6e |exit(1, "could n| 00000420 6f 74 20 6f 70 65 6e 20 2f 65 74 63 2f 70 61 73 |ot open /etc/pas| 00000430 73 77 64 22 29 0d 01 a4 08 6c 25 3d 30 0d 01 ae |swd")....l%=0...| 00000440 08 68 25 3d 30 0d 01 b8 0b 6d 75 25 20 3d 20 30 |.h%=0....mu% = 0| 00000450 0d 01 c2 05 f5 0d 01 cc 12 20 20 20 20 63 24 20 |......... c$ | 00000460 3d 20 be 23 69 66 25 0d 01 d6 24 f4 20 20 20 20 |= .#if%...$. | 00000470 20 49 46 20 4c 45 46 54 24 28 63 24 2c 20 6c 65 | IF LEFT$(c$, le| 00000480 6e 25 29 20 3d 20 75 73 65 72 24 0d 01 e0 18 f4 |n%) = user$.....| 00000490 20 20 20 20 20 20 20 20 20 43 4c 4f 53 45 20 23 | CLOSE #| 000004a0 69 66 25 0d 01 ea 30 f4 20 20 20 20 20 20 20 20 |if%...0. | 000004b0 20 50 52 4f 43 65 78 69 74 28 31 2c 20 22 55 73 | PROCexit(1, "Us| 000004c0 65 72 20 61 6c 72 65 61 64 79 20 65 78 69 73 74 |er already exist| 000004d0 73 22 29 0d 01 f4 0f f4 20 20 20 20 20 45 4e 44 |s")..... END| 000004e0 49 46 0d 01 fe 1c 20 20 20 20 e7 20 63 24 20 3c |IF.... . c$ <| 000004f0 3e 20 22 22 20 8c 20 6c 25 20 2b 3d 20 31 0d 02 |> "" . l% += 1..| 00000500 08 16 20 20 20 20 69 25 20 3d 20 a7 63 24 2c 20 |.. i% = .c$, | 00000510 22 3a 22 29 0d 02 12 1e 20 20 20 20 69 25 20 3d |":").... i% =| 00000520 20 a7 63 24 2c 20 22 3a 22 2c 20 69 25 20 2b 20 | .c$, ":", i% + | 00000530 31 29 0d 02 1c 1c 20 20 20 20 75 25 20 3d 20 bb |1).... u% = .| 00000540 28 c1 63 24 2c 20 69 25 20 2b 20 31 29 29 0d 02 |(.c$, i% + 1))..| 00000550 26 1d 20 20 20 20 e7 20 75 25 20 3e 20 6d 75 25 |&. . u% > mu%| 00000560 20 8c 20 6d 75 25 20 3d 20 75 25 0d 02 30 0b fd | . mu% = u%..0..| 00000570 20 63 24 3d 22 22 0d 02 3a 0a d9 20 23 69 66 25 | c$=""..:.. #if%| 00000580 0d 02 44 04 0d 02 4e 3e f4 20 6e 6f 77 20 77 65 |..D...N>. now we| 00000590 20 63 6f 70 79 20 74 68 65 20 70 61 73 73 77 64 | copy the passwd| 000005a0 20 66 69 6c 65 20 74 6f 20 61 20 73 63 72 61 70 | file to a scrap| 000005b0 66 69 6c 65 20 6c 69 6e 65 20 62 79 20 6c 69 6e |file line by lin| 000005c0 65 2e 0d 02 58 17 69 66 25 20 3d 20 8e 28 65 74 |e...X.if% = .(et| 000005d0 63 70 61 73 73 77 64 24 29 0d 02 62 18 6f 66 25 |cpasswd$)..b.of%| 000005e0 20 3d 20 ae 28 65 74 63 62 70 61 73 73 77 64 24 | = .(etcbpasswd$| 000005f0 29 0d 02 6c 41 e7 20 6f 66 25 20 3d 20 30 20 8c |)..lA. of% = 0 .| 00000600 20 f2 65 78 69 74 28 31 2c 20 22 63 6f 75 6c 64 | .exit(1, "could| 00000610 20 6e 6f 74 20 6f 70 65 6e 20 3c 57 69 6d 70 24 | not open <Wimp$| 00000620 53 63 72 61 70 44 69 72 3e 2e 70 61 73 73 77 64 |ScrapDir>.passwd| 00000630 22 29 0d 02 76 11 e3 20 69 25 20 3d 20 31 20 b8 |")..v.. i% = 1 .| 00000640 20 6c 25 0d 02 80 12 20 20 20 20 63 24 20 3d 20 | l%.... c$ = | 00000650 be 23 69 66 25 0d 02 8a 11 20 20 20 20 d5 20 23 |.#if%.... . #| 00000660 6f 66 25 2c 63 24 0d 02 94 08 ed 20 69 25 0d 02 |of%,c$..... i%..| 00000670 9e 04 0d 02 a8 3d f4 20 61 66 74 65 72 20 74 68 |.....=. after th| 00000680 61 74 20 77 65 20 63 6f 6d 70 6f 73 65 20 6f 75 |at we compose ou| 00000690 74 20 6e 65 77 20 65 6e 74 72 79 3a 20 75 73 65 |t new entry: use| 000006a0 72 6e 61 6d 65 2c 20 6e 65 77 20 75 73 65 72 0d |rname, new user.| 000006b0 02 b2 3c f4 20 6e 75 6d 62 65 72 20 69 73 20 68 |..<. number is h| 000006c0 69 67 68 65 73 74 20 75 73 65 72 20 6e 75 6d 62 |ighest user numb| 000006d0 65 72 20 2b 20 31 2c 20 67 72 6f 75 70 6e 75 6d |er + 1, groupnum| 000006e0 62 65 72 20 69 73 20 47 52 50 25 0d 02 bc 30 6f |ber is GRP%...0o| 000006f0 24 20 3d 20 75 73 65 72 24 20 2b 20 22 3a 22 2b |$ = user$ + ":"+| 00000700 20 c3 28 6d 75 25 20 2b 20 31 29 20 2b 20 22 3a | .(mu% + 1) + ":| 00000710 22 20 2b 20 c3 28 47 52 50 25 29 0d 02 c6 2c 6f |" + .(GRP%)...,o| 00000720 24 20 3d 20 6f 24 20 2b 20 22 3a 3a 2f 75 73 72 |$ = o$ + "::/usr| 00000730 2f 22 20 2b 20 75 73 65 72 24 20 2b 20 22 3a 2f |/" + user$ + ":/| 00000740 62 69 6e 2f 73 68 22 0d 02 d0 34 f4 20 74 68 65 |bin/sh"...4. the| 00000750 6e 20 77 65 20 61 70 70 65 6e 64 20 74 68 65 20 |n we append the | 00000760 6e 65 77 20 65 6e 74 72 79 20 74 6f 20 74 68 65 |new entry to the| 00000770 20 73 63 72 61 70 66 69 6c 65 2e 0d 02 da 0e d5 | scrapfile......| 00000780 20 23 6f 66 25 2c 20 6f 24 0d 02 e4 0a d9 20 23 | #of%, o$..... #| 00000790 6f 66 25 0d 02 ee 0a d9 20 23 69 66 25 0d 02 f8 |of%..... #if%...| 000007a0 27 ff 28 22 73 65 74 74 79 70 65 20 22 20 2b 65 |'.("settype " +e| 000007b0 74 63 62 70 61 73 73 77 64 24 20 2b 20 22 20 46 |tcbpasswd$ + " F| 000007c0 46 46 22 29 0d 03 02 04 0d 03 0c 3f f4 20 6e 6f |FF").......?. no| 000007d0 77 20 63 6f 70 79 20 6f 75 72 20 6e 65 77 20 66 |w copy our new f| 000007e0 69 6c 65 20 6f 76 65 72 20 74 68 65 20 6f 6c 64 |ile over the old| 000007f0 20 6f 6e 65 20 74 68 65 6e 20 65 78 69 74 20 61 | one then exit a| 00000800 6e 64 20 74 65 6c 6c 0d 03 16 22 f4 20 4e 65 77 |nd tell...". New| 00000810 73 42 61 73 65 20 74 68 61 74 20 61 6c 6c 20 77 |sBase that all w| 00000820 65 6e 74 20 66 69 6e 65 2e 0d 03 20 3b ff 28 22 |ent fine... ;.("| 00000830 63 6f 70 79 20 22 20 2b 20 65 74 63 62 70 61 73 |copy " + etcbpas| 00000840 73 77 64 24 20 2b 20 22 20 22 20 2b 20 65 74 63 |swd$ + " " + etc| 00000850 70 61 73 73 77 64 24 20 2b 20 22 20 46 44 7e 43 |passwd$ + " FD~C| 00000860 7e 56 22 29 0d 03 2a 1a f2 65 78 69 74 28 30 2c |~V")..*..exit(0,| 00000870 20 22 75 73 65 72 20 61 64 64 65 64 22 29 0d 03 | "user added")..| 00000880 34 05 e0 0d 03 3e 04 0d 03 48 36 f4 20 63 6f 6e |4....>...H6. con| 00000890 76 65 72 74 20 61 6c 6c 20 63 68 61 72 61 63 74 |vert all charact| 000008a0 65 72 73 20 69 6e 20 61 20 73 74 72 69 6e 67 20 |ers in a string | 000008b0 74 6f 20 6c 6f 77 65 72 63 61 73 65 2e 0d 03 52 |to lowercase...R| 000008c0 05 f4 0d 03 5c 12 dd 20 a4 74 6f 6c 6f 77 65 72 |....\.. .tolower| 000008d0 28 61 24 29 0d 03 66 0c ea 20 69 25 2c 20 63 24 |(a$)..f.. i%, c$| 000008e0 0d 03 70 12 e3 20 69 25 20 3d 20 31 20 b8 20 a9 |..p.. i% = 1 . .| 000008f0 61 24 0d 03 7a 18 20 20 20 20 63 24 20 3d 20 c1 |a$..z. c$ = .| 00000900 61 24 2c 20 69 25 2c 20 31 29 0d 03 84 21 20 20 |a$, i%, 1)...! | 00000910 20 20 e7 20 63 24 20 3e 3d 20 22 41 22 20 80 20 | . c$ >= "A" . | 00000920 63 24 20 3c 3d 20 22 5a 22 20 8c 0d 03 8e 2a 20 |c$ <= "Z" ....* | 00000930 20 20 20 20 20 20 20 c1 61 24 2c 20 69 25 2c 20 | .a$, i%, | 00000940 31 29 20 3d 20 bd 28 97 28 63 24 29 20 2b 20 63 |1) = .(.(c$) + c| 00000950 64 69 66 66 29 0d 03 98 09 20 20 20 20 cd 0d 03 |diff).... ...| 00000960 a2 08 3d 20 61 24 0d 03 ac 04 0d 03 b6 31 f4 20 |..= a$.......1. | 00000970 65 78 69 74 20 66 72 6f 6d 20 68 65 72 65 2c 20 |exit from here, | 00000980 72 65 74 75 72 6e 69 6e 67 20 61 70 70 72 6f 70 |returning approp| 00000990 72 69 61 74 65 20 69 6e 66 6f 2e 0d 03 c0 05 f4 |riate info......| 000009a0 0d 03 ca 11 dd f2 65 78 69 74 28 6e 25 2c 61 24 |......exit(n%,a$| 000009b0 29 0d 03 d4 25 ff 28 22 73 65 74 20 4e 65 77 73 |)...%.("set News| 000009c0 42 61 73 65 24 52 65 74 75 72 6e 43 6f 64 65 20 |Base$ReturnCode | 000009d0 22 2b c3 6e 25 29 0d 03 de 24 ff 28 22 73 65 74 |"+.n%)...$.("set| 000009e0 20 4e 65 77 73 42 61 73 65 24 52 65 74 75 72 6e | NewsBase$Return| 000009f0 49 6e 66 6f 20 22 2b 61 24 29 0d 03 e8 05 e0 0d |Info "+a$)......| 00000a00 03 f2 05 e1 0d ff |......| 00000a06
.