×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • 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!
  • Students Click Here

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

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

jumpstart script

jumpstart script

jumpstart script

(OP)
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

 

RE: jumpstart script

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.

RE: jumpstart script

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}

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

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! Already a Member? Login

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