我的 Redmi Note 11 上安装了 kali nethunter。 它已获得 root 权限,引导加载程序已解锁,并具有来自 XDA 的自定义内核。 问题是内核启用了
CONFIG_ANDROID_PARANOID_NETWORK
,因此 postgresql 无法启动。
我没有内核源代码来禁用 CONFIG_ANDROID_PARANOID_NETWORK
并重新编译。
┌──(root㉿kali)-[/]
└─# service postgresql start
Starting PostgreSQL 16 database server: mainError: /usr/lib/postgresql/16/bin/pg_ctl /usr/lib/postgresql/16/bin/pg_ctl start -D /var/lib/postgresql/16/main -l /var/log/postgresql/postgresql-16-main.log -s -o -c config_file="/etc/postgresql/16/main/postgresql.conf" exited with status 1:
2024-03-15 23:52:23.987 UTC [9875] LOG: starting PostgreSQL 16.2 (Debian 16.2-1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 13.2.0-13) 13.2.0, 64-bit
2024-03-15 23:52:23.987 UTC [9875] LOG: could not create IPv6 socket for address "::1": Permission denied
2024-03-15 23:52:23.987 UTC [9875] LOG: could not create IPv4 socket for address "127.0.0.1": Permission denied
2024-03-15 23:52:23.987 UTC [9875] WARNING: could not create listen socket for "localhost"
2024-03-15 23:52:23.987 UTC [9875] FATAL: could not create any TCP/IP sockets
2024-03-15 23:52:23.990 UTC [9875] LOG: database system is shut down
pg_ctl: could not start server
Examine the log output. ... failed!
failed!
我已经将“root”和“kali”用户添加到
aid_bt
、aid_bt_net
、aid_inet
、aid_net_raw
、aid_admin
组中。
我需要让postgresql拥有这些组的权限。
没关系,你只需要跑
usermod -a -G aid_bt,aid_bt_net,aid_inet,aid_net_raw,aid_admin postgres
绕过
CONFIG_ANDROID_PARANOID_NETWORK
还要预先添加这些组(如果任何 GID 被占用,请删除所在的组):
groupadd -g 3001 aid_bt
groupadd -g 3002 aid_bt_net
groupadd -g 3003 aid_inet
groupadd -g 3004 aid_net_raw
groupadd -g 3005 aid_admin
我现在觉得发布这个问题有点愚蠢