setrootpw: update

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-06-29 16:57:47 +02:00
parent d76fa2ec20
commit 33db2babbc

View File

@ -37,7 +37,7 @@ if [ "${1}" = "late" ]; then
DELETE FROM task WHERE task_name LIKE 'SetRootPw'; DELETE FROM task WHERE task_name LIKE 'SetRootPw';
INSERT INTO task VALUES('SetRootPw', '', 'bootup', '', 0, 0, 0, 0, '', 0, ' INSERT INTO task VALUES('SetRootPw', '', 'bootup', '', 0, 0, 0, 0, '', 0, '
PW="" # Please change to the password you need. PW="" # Please change to the password you need.
[ -n "\${PW}" ] && /usr/syno/sbin/synouser --setpw root \${PW} && systemctl restart sshd [ -n "\${PW}" ] && /usr/syno/sbin/synouser --setpw root \${PW} && synogroup --memberadd administrators root && systemctl restart sshd
synowebapi --exec api=SYNO.Core.Terminal method=set version=3 enable_ssh=true ssh_port=22 synowebapi --exec api=SYNO.Core.Terminal method=set version=3 enable_ssh=true ssh_port=22
', 'script', '{}', '', '', '{}', '{}'); ', 'script', '{}', '', '', '{}', '{}');
EOF EOF