Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This site is truly a marvel. Without a doubt the most comprehensive, friendly and just plain useful resource of its kind..."

Geography

Where in the world do Tek-Tips members come from?
darshadow (TechnicalUser)
10 May 12 2:27
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

 
tarn (TechnicalUser)
10 May 12 9:54

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.

cndcadams (IS/IT--Management)
11 May 12 15:18
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}

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close