mirror of
https://github.com/A2osX/A2osX.git
synced 2025-04-06 02:40:10 +00:00
Updated MAKE and XLS. MAKE needed to test latest issue, see XLS.
This commit is contained in:
parent
5ed5171f8b
commit
e421086764
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ ECHO " 2) Display Memory (MEM)"
|
||||
ECHO " 3) Configure Networking (CONFNET)"
|
||||
ECHO " 4) Kernel Configuration (KCONFIG)"
|
||||
ECHO " 5) List Volumes Online (ONLINE)"
|
||||
ECHO " 6) "
|
||||
ECHO " 6) User Management (USERMENU)"
|
||||
ECHO " 7) "
|
||||
ECHO " 8) "
|
||||
ECHO " 9) A2osX Test Suite"
|
||||
@ -46,6 +46,7 @@ ELSE
|
||||
PAUSE
|
||||
ELSE
|
||||
IF [ $Z = "6" ]
|
||||
USERMENU
|
||||
ELSE
|
||||
IF [ $Z = "7" ]
|
||||
ELSE
|
||||
|
74
ADMIN/LISTUSERS.txt
Normal file
74
ADMIN/LISTUSERS.txt
Normal file
@ -0,0 +1,74 @@
|
||||
NEW
|
||||
PREFIX
|
||||
AUTO 4,1
|
||||
#!/BIN/SH
|
||||
#
|
||||
# This is Admin Script for listing the users logins
|
||||
# found in the etc/passwd file.
|
||||
#
|
||||
ECHO "\f\n Admin: List System Users"
|
||||
ECHO
|
||||
IF [ -D ${ROOT}ETC ]
|
||||
ELSE
|
||||
ECHO " Your ETC directory that should be in ${ROOT}"
|
||||
ECHO " is missing. This directory is needed for the"
|
||||
ECHO " operation of your system."
|
||||
ECHO
|
||||
READ -P " Should I create this direcory for you (Y/N)? : " Z
|
||||
SWITCH $Z
|
||||
CASE "Y"
|
||||
CASE "y"
|
||||
MD ${ROOT}ETC
|
||||
ECHO "\f\n Admin: List System Users"
|
||||
ECHO
|
||||
BREAK
|
||||
DEFAULT
|
||||
ECHO "\n\nPress Return to Exit"
|
||||
PAUSE
|
||||
EXIT
|
||||
END
|
||||
FI
|
||||
IF [ -F ${ROOT}ETC/PASSWD ]
|
||||
ELSE
|
||||
ECHO " Your PASSWD file is missing. It should be located in the"
|
||||
ECHO " ${ROOT}/ETC directory. This file is needed for the"
|
||||
ECHO " normal operation of your system Note there are specific A2osX"
|
||||
ECHO " configurations where the absence of this file is by design."
|
||||
ECHO
|
||||
READ -P " Should I create the default A2osX PASSWD file (Y/N)? : " Z
|
||||
SWITCH $Z
|
||||
CASE "Y"
|
||||
CASE "y"
|
||||
ECHO "root:1cedeaefaffab15fd23d7a282c6610b1:0:0:A2osX Root:/root:/bin/sh" > ${ROOT}ETC/PASSWD
|
||||
ECHO "guest:084e0343a0486ff05530df6c705c8bb4:1000:1000:Guest Account:/home/guest:/bin/sh" >> ${ROOT}ETC/PASSWD
|
||||
ECHO "\f\n Admin: List System Users"
|
||||
ECHO
|
||||
BREAK
|
||||
DEFAULT
|
||||
ECHO "\n\nPress Return to Exit"
|
||||
PAUSE
|
||||
EXIT
|
||||
END
|
||||
FI
|
||||
# OK Now we can actually list the users!
|
||||
ECHO " UID GID User Full Name Home Directory"
|
||||
ECHO " ----- ----- -------- ------------------------- -------------------------"
|
||||
SET LINE = 7
|
||||
FOR F IN `CAT ${ROOT}ETC/PASSWD`
|
||||
SET PWUSER = `CUT -S : -F 1 "${F}"`
|
||||
SET PWUID = `CUT -S : -F 3 "${F}"`
|
||||
SET PWGID = `CUT -S : -F 4 "${F}"`
|
||||
SET PWNAME = `CUT -S : -F 5 "${F}"`
|
||||
SET PWHOME = `CUT -S : -F 6 "${F}"`
|
||||
ECHO -N "\e[${LINE};1H${PWUSER}"
|
||||
ECHO -N "\e[${LINE};9H${PWUID}"
|
||||
ECHO -N "\e[${LINE};16H${PWGID}"
|
||||
ECHO -N "\e[${LINE};26H${PWNAME}"
|
||||
ECHO -N "\e[${LINE};53H${PWHOME}"
|
||||
SET LINE = $LINE + 1
|
||||
NEXT
|
||||
ECHO
|
||||
ECHO "PRESS RETURN"
|
||||
PAUSE
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/ADMIN/LISTUSERS
|
52
ADMIN/USERMENU.txt
Normal file
52
ADMIN/USERMENU.txt
Normal file
@ -0,0 +1,52 @@
|
||||
NEW
|
||||
PREFIX
|
||||
AUTO 4,1
|
||||
#!/BIN/SH
|
||||
#
|
||||
# This menu will display a menu of options
|
||||
# to Administer Users on your A2osX system.
|
||||
#
|
||||
SET MENULOOP = 1
|
||||
WHILE [ $MENULOOP -EQ 1 ]
|
||||
ECHO "\f A2osX User Admin Menu\n"
|
||||
ECHO " L) List Users"
|
||||
ECHO " 2) Add User"
|
||||
ECHO " 3) Delete User"
|
||||
ECHO " 4) Edit User Details"
|
||||
ECHO " 5) Change Password"
|
||||
ECHO "\n X) Exit"
|
||||
ECHO "\n"
|
||||
READ -P "Enter Choice: " Z
|
||||
IF [ -Z $Z ]
|
||||
#User pressed return with no choice, bad idea
|
||||
FI
|
||||
SWITCH $Z
|
||||
CASE "x"
|
||||
CASE "X"
|
||||
EXIT
|
||||
BREAK
|
||||
CASE "L"
|
||||
CASE "l"
|
||||
LISTUSERS
|
||||
BREAK
|
||||
CASE 2
|
||||
ADDUSER
|
||||
BREAK
|
||||
CASE 3
|
||||
DELUSER
|
||||
BREAK
|
||||
CASE 4
|
||||
EDITUSER
|
||||
BREAK
|
||||
CASE 5
|
||||
PASSWD
|
||||
BREAK
|
||||
DEFAULT
|
||||
ECHO "You entered an invalid choice"
|
||||
PAUSE
|
||||
END
|
||||
LOOP
|
||||
ECHO
|
||||
ECHO
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/ADMIN/USERMENU
|
Loading…
x
Reference in New Issue
Block a user