troubleshooting Question

Please help modify thi linux script

Avatar of oo_tatang
oo_tatang asked on
LinuxLinux OS Dev
9 Comments1 Solution392 ViewsLast Modified:
#!/bin/bash
while read server
do
  echo -n $server
  ssh root@$server "sed -i '/.*ctrlaltdel.*/ s/^/#/' /etc/inittab"

  if [ $? -ne 0 ]; then
    echo "[ FAIL ]"
  else
    echo "[ done ]"
  fi
done < tone_dev

ca::ctrlaltdel:/sbin/shutdown -t3 -r now
#ca::ctrlaltdel:/sbin/shutdown -t3 -r now

[root@server07 scripts]# ./disable_ctrlaltdel.sh
server1.am.dev.company.net[ done ]


server1.am.dev.company.net
server2.am.dev.company.net
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros