Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jumpstart script

Status
Not open for further replies.

darshadow

Technical User
Dec 14, 2010
11
0
0
CH
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 :
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
But this two other commands echo in sshd_config or cat in system doesn't run :
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

 
You don't say what errors you are getting that may help, but are you sure it's not the "test [ -f ]" and the "EOF" that's causing your problem?


I'd put these type of changes in a "post Jumpstart" script myself ...

Sorry otherwise no idea!

Laurie.
 
where is the ending " for this... see bold "Allowgroups

/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}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top