2013-09-02 14:01:50 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Re-used example from SJD
|
|
|
|
#
|
|
|
|
|
|
|
|
if test -d /root/.ssh && \
|
|
|
|
test `stat -t /root/.ssh | cut -d\ -f5` != 0; then
|
|
|
|
chown root.root /root/.ssh
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -d /root/.ssh && \
|
|
|
|
test `stat -c %a /root/.ssh` != 700; then
|
|
|
|
chmod 700 /root/.ssh
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -f /root/.ssh/authorized_keys; then
|
|
|
|
if test `stat -t /root/.ssh/authorized_keys | cut -d\ -f5` != 0; then
|
|
|
|
chown root.root /root/.ssh/authorized_keys
|
|
|
|
fi
|
2023-11-17 12:50:02 +00:00
|
|
|
if test `stat --printf=%a /root/.ssh/authorized_keys` != 440; then
|
|
|
|
chmod 440 /root/.ssh/authorized_keys
|
2013-09-02 14:01:50 +00:00
|
|
|
fi
|
|
|
|
fi
|