*NETCONF +MDFS will switch on the MDFS passwords file, so I have modified it to read both if they exist, as I found different users in the two. In the MDFS file, the user blocks are 64 bytes starting from 64:
(Line 50 is redundant actually, but explains what the variables do).
Code:
10REM PiFS User Lister 20REM 1.1 - List users in %PIPASSWD and %PASSWORDS 30PRINT"PiFS User Lister" 40X=OPENIN"%PIPASSWD":IFX=0 PRINT"No Pi passwords file found":ELSE P%=0:I%=&100:PRINT'"Reading Pi passwords file...":PROCread 50P%=0:I%=&100:REM ptr and offsets in PW file 60X=OPENIN"%PASSWORDS" 70IFX=0 PRINT"No MDFS passwords file found" ELSE I%=&40:P%=&40:PTR#X=&40:PRINT'"Reading MDFS passwords file...":PROCread 80END 90DEFPROCread 100REPEAT 110user$="":lastuser=FALSE 120FORB%=0TO9 130C%=BGET#X:IFC%=13 C%=32:REM Bodge for CR in middle of string 140user$=user$+CHR$C% 150NEXT 160IFLEFT$(user$,1)<>CHR$0 AND LEFT$(user$,1)<>CHR$&FF PRINTuser$ ELSE lastuser=TRUE 170P%=P%+I%:PTR#X=P% 180UNTILlastuser OR EOF#X 190CLOSE#X 200ENDPROC
Statistics: Posted by BeebMaster — Tue Jan 21, 2025 6:35 pm