diff --git a/scripts/setup-user.sh b/scripts/setup-user.sh index d0c7008..6661827 100755 --- a/scripts/setup-user.sh +++ b/scripts/setup-user.sh @@ -1,19 +1,223 @@ #!/bin/sh -groupadd -g 1001 radio -useradd -u 1001 -g 1001 -s /usr/sbin/nologin radio -groupadd -g 1021 gps -useradd -u 1021 -g 1021 -s /usr/sbin/nologin gps +groupadd --gid 1000 aid_system +useradd --gid 1000 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1000 aid_system + +groupadd --gid 1001 aid_radio +useradd --gid 1001 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1001 aid_radio + +groupadd --gid 1002 aid_bluetooth +useradd --gid 1002 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1002 aid_bluetooth + +groupadd --gid 1003 aid_graphics +useradd --gid 1003 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1003 aid_graphics + +groupadd --gid 1004 aid_input +useradd --gid 1004 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1004 aid_input + +groupadd --gid 1005 aid_audio +useradd --gid 1005 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1005 aid_audio + +groupadd --gid 1006 aid_camera +useradd --gid 1006 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1006 aid_camera + +groupadd --gid 1007 aid_log +useradd --gid 1007 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1007 aid_log + +groupadd --gid 1008 aid_compass +useradd --gid 1008 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1008 aid_compass + +groupadd --gid 1009 aid_mount +useradd --gid 1009 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1009 aid_mount + +groupadd --gid 1010 aid_wifi +useradd --gid 1010 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1010 aid_wifi + +groupadd --gid 1011 aid_adb +useradd --gid 1011 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1011 aid_adb + +groupadd --gid 1012 aid_install +useradd --gid 1012 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1012 aid_install + +groupadd --gid 1013 aid_media +useradd --gid 1013 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1013 aid_media + +groupadd --gid 1014 aid_dhcp +useradd --gid 1014 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1014 aid_dhcp + +groupadd --gid 1015 aid_sdcard_rw +useradd --gid 1015 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1015 aid_sdcard_rw + +groupadd --gid 1016 aid_vpn +useradd --gid 1016 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1016 aid_vpn + +groupadd --gid 1017 aid_keystore +useradd --gid 1017 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1017 aid_keystore + +groupadd --gid 1018 aid_usb +useradd --gid 1018 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1018 aid_usb + +groupadd --gid 1019 aid_drm +useradd --gid 1019 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1019 aid_drm + +groupadd --gid 1020 aid_mdnsr +useradd --gid 1020 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1020 aid_mdnsr + +groupadd --gid 1021 aid_gps +useradd --gid 1021 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1021 aid_gps + +groupadd --gid 1023 aid_media_rw +useradd --gid 1023 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1023 aid_media_rw + +groupadd --gid 1024 aid_mtp +useradd --gid 1024 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1024 aid_mtp + +groupadd --gid 1026 aid_drmrpc +useradd --gid 1026 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1026 aid_drmrpc + +groupadd --gid 1027 aid_nfc +useradd --gid 1027 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1027 aid_nfc + +groupadd --gid 1028 aid_sdcard_r +useradd --gid 1028 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1028 aid_sdcard_r + +groupadd --gid 1029 aid_clat +useradd --gid 1029 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1029 aid_clat + +groupadd --gid 1030 aid_loop_radio +useradd --gid 1030 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1030 aid_loop_radio + +groupadd --gid 1031 aid_mediadrm +useradd --gid 1031 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1031 aid_mediadrm + +groupadd --gid 1032 aid_package_info +useradd --gid 1032 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1032 aid_package_info + +groupadd --gid 1033 aid_sdcard_pics +useradd --gid 1033 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1033 aid_sdcard_pics + +groupadd --gid 1034 aid_sdcard_av +useradd --gid 1034 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1034 aid_sdcard_av + +groupadd --gid 1035 aid_sdcard_all +useradd --gid 1035 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1035 aid_sdcard_all + +groupadd --gid 1036 aid_logd +useradd --gid 1036 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1036 aid_logd + +groupadd --gid 1037 aid_shared_relro +useradd --gid 1037 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1037 aid_shared_relro + +groupadd --gid 1038 aid_dbus +useradd --gid 1038 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1038 aid_dbus + +groupadd --gid 1039 aid_tlsdate +useradd --gid 1039 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1039 aid_tlsdate + +groupadd --gid 1040 aid_mediaex +useradd --gid 1040 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1040 aid_mediaex + +groupadd --gid 1041 aid_audioserver +useradd --gid 1041 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1041 aid_audioserver + +groupadd --gid 1042 aid_metrics_coll +useradd --gid 1042 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1042 aid_metrics_coll + +groupadd --gid 1043 aid_metricsd +useradd --gid 1043 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1043 aid_metricsd + +groupadd --gid 1044 aid_webserv +useradd --gid 1044 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1044 aid_webserv + +groupadd --gid 1045 aid_debuggerd +useradd --gid 1045 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1045 aid_debuggerd + +groupadd --gid 1046 aid_mediacodec +useradd --gid 1046 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1046 aid_mediacodec + +groupadd --gid 1047 aid_cameraserver +useradd --gid 1047 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1047 aid_cameraserver + +groupadd --gid 1048 aid_firewall +useradd --gid 1048 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1048 aid_firewall + +groupadd --gid 1049 aid_trunks +useradd --gid 1049 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1049 aid_trunks + +groupadd --gid 1050 aid_nvram +useradd --gid 1050 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1050 aid_nvram + +groupadd --gid 1051 aid_dns +useradd --gid 1051 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1051 aid_dns + +groupadd --gid 1052 aid_dns_tether +useradd --gid 1052 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 1052 aid_dns_tether + +groupadd --gid 2000 aid_shell +useradd --gid 2000 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 2000 aid_shell + +groupadd --gid 2001 aid_cache +useradd --gid 2001 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 2001 aid_cache + +groupadd --gid 2002 aid_diag +useradd --gid 2002 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 2002 aid_diag + +groupadd --gid 2950 aid_qcom_diag +useradd --gid 2950 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 2950 aid_qcom_diag + +groupadd --gid 2951 aid_rfs +useradd --gid 2951 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 2951 aid_rfs + +groupadd --gid 2952 aid_rfs_shared +useradd --gid 2952 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 2952 aid_rfs_shared + +groupadd --gid 3001 aid_net_bt_admin +useradd --gid 3001 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3001 aid_net_bt_admin + +groupadd --gid 3002 aid_net_bt +useradd --gid 3002 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3002 aid_net_bt + +groupadd --gid 3003 aid_inet +useradd --gid 3003 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3003 aid_inet + +groupadd --gid 3004 aid_net_raw +useradd --gid 3004 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3004 aid_net_raw + +groupadd --gid 3005 aid_net_admin +useradd --gid 3005 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3005 aid_net_admin + +groupadd --gid 3006 aid_net_bw_stats +useradd --gid 3006 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3006 aid_net_bw_stats + +groupadd --gid 3007 aid_net_bw_acct +useradd --gid 3007 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3007 aid_net_bw_acct + +groupadd --gid 3008 aid_net_bt_stack +useradd --gid 3008 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3008 aid_net_bt_stack + +groupadd --gid 3009 aid_readproc +useradd --gid 3009 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3009 aid_readproc + +groupadd --gid 3010 aid_wakelock +useradd --gid 3010 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3010 aid_wakelock + +groupadd --gid 3011 aid_sensors +useradd --gid 3011 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3011 aid_sensors + +groupadd --gid 3012 aid_rfs_old +useradd --gid 3012 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3012 aid_rfs_old + +groupadd --gid 3013 aid_rfs_shared_old +useradd --gid 3013 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 3013 aid_rfs_shared_old + +groupadd --gid 9997 aid_everybody +useradd --gid 9997 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 9997 aid_everybody + +groupadd --gid 9998 aid_misc +useradd --gid 9998 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 9998 aid_misc + +groupadd --gid 9999 aid_nobody +useradd --gid 9999 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 9999 aid_nobody -groupadd -g 1000 aid_system -groupadd -g 1003 aid_graphics -groupadd -g 1004 aid_input -groupadd -g 1005 aid_audio -groupadd -g 3001 aid_net_bt_admin -groupadd -g 3002 aid_net_bt -groupadd -g 3003 aid_inet -groupadd -g 3004 aid_inet_raw -groupadd -g 3005 aid_inet_admin groupadd -g 100000 gemini - -useradd -m -u 100000 -g 100000 -G audio,video,sudo,aid_system,aid_graphics,aid_input,aid_audio,aid_net_bt_admin,aid_net_bt,aid_inet,aid_inet_raw,aid_inet_admin -s /bin/bash gemini +useradd -m -u 100000 -g 100000 -G audio,video,sudo,aid_system,aid_graphics,aid_input,aid_audio,aid_net_bt_admin,aid_net_bt,aid_inet,aid_net_raw,aid_net_admin -s /bin/bash gemini echo gemini:gemini | chpasswd