#!/bin/sh # change_ppp_dialup_account_info # The name says it all! # With ppp dialup under RedHat Linux, there are 5 files that must be # changed when you want to change which ISP account you dial into. # That is, when you want to change phone number, account user name, # and password, there are five files to edit. # This script will prompt for the phone number, user name, and password # and make these changes. # It will back up the original files, first (in case you mess it up) # These files are: # /etc/ppp/ chatscript, chap-secrets, pap-secrets # /etc/sysconfig/network-scripts/ ifcfg-ppp0, chat-ppp0 # # Written by: Jerry Winegarden # Last revised: 9/28/01 # Calls: none # Called by: none # --------------------------------------------------------------------- # echo "Change ISP account information for ppp Internet dialup connections" echo "" echo -n "What is the ISP phone number: " read PHONENUM echo "" echo -n "What is the account login (or username): " read NAME echo "" echo -n "What is the account password: " read PASSW echo "" echo "Backing up files" cd /etc/ppp /bin/cp -f chatscript chatscript.bak /bin/cp -f chap-secrets chap-secrets.bak /bin/cp -f pap-secrets pap-secrets.bak cd /etc/sysconfig/network-scripts /bin/cp -f ifcfg-ppp0 _ifcfg-ppp0.bak /bin/cp -f chat-ppp0 chat-ppp0.bak echo "Note: file named ifcfg-ppp0 in /etc/sysconfig/network-scripts" echo " has been backed up as: _ifcfg-ppp0.bak" echo " (note the leading _ ) echo "" echo "Making changes" # # UNDER CONSTRUCTION: # STILL TO DO: # call perl to make edits in these files #