Hi,
I'm using scripting for the jumpstart.
Has anyone an Idea why in one script this command run well,
By example, this echo command on at.deny run well :
But this two other commands echo in sshd_config or cat in system doesn't run :
I've try many thing BUT I don't known any more where could by the problem!
Thx in advance
I'm using scripting for the jumpstart.
Has anyone an Idea why in one script this command run well,
By example, this echo command on at.deny run well :
Code:
# at.deny must be set for hardening
/usr/bin/echo "Update at.deny ..."
ATDENY=/a/etc/cron.d/at.deny
[ ! -f ${ATDENY} ] && (
/usr/bin/echo "staed" >> ${ATDENY}
/usr/bin/echo "ederf" >> ${ATDENY}
/usr/bin/echo "sed2" >> ${ATDENY}
...
/usr/bin/echo "def2" >> ${ATDENY}
)
[ -f ${ATDENY} ] && for ATUSR in staed ederf sed2 ... def2;
do
/usr/bin/cat ${ATDENY} | grep ${ATUSR}
[ $? != 0 ] && /usr/bin/echo ${ATUSR} >> ${ATDENY}
done
Code:
# limited remote access (ssh)
/usr/bin/echo "Limit SSH Access ..."
SSHDCONF=/a/etc/ssh/sshd_config
SSHDTMP=/a/tmp/sshdconf.tmp
# limit remote access to defined users
[ -f ${SSHDCONF} ] && /usr/bin/echo "AllowGroups sugrp >> ${SSHDCONF}
SYSFILE=/a/etc/system
SYSFILE_TMP=/a/var/tmp/system_tmp
/usr/bin/cp ${SYSFILE} ${SYSFILE_TMP}
/usr/bin/cat >> ${SYSFILE_TMP} << EOF
set rlim_fd_cur=32767
set rlim_fd_max=327679
EOF
/usr/bin/cp ${SYSFILE_TMP} ${SYSFILE}
I've try many thing BUT I don't known any more where could by the problem!
Thx in advance