I'm totally new to scripting. Please help me. I've tried reading
http://www.freeos.com/guides/lsst/ but I haven't found anything to specifically address commandline interface with standard commands that require password entering.
Distribution:Fedora Core 4 linux
Issue:
Since the gnome network manager/configuration wizard doesn't recognize my ndiswrapper installed wireless I tried writing a script to activate the wireless card.
IF i manually open a terminal and switch to root I can successfully execute a single script to activate. I tried adding the su to the script so I could assign it to a pointer/shortcut on the launch panel
when I run the script with the su command in it requests the root password then just exits to the command line. This is what I've written:
su
sleep 2
echo configuring wireless card
/sbin/iwconfig wlan0 essid <ESSID>
/sbin/iwconfig wlan0 mode Managed
/sbin/iwconfig wlan0 key restricted <KEY>
/sbin/dhclient wlan0
sleep 5
/sbin/ifconfig wlan0 up
sleep 2
echo wireless card configured
sleep 2
exit
exit
This didn't work so I tried a script to execute other scripts with the first switching to root. always the su terminates all the scripts.
I've tried googling several different keywords in an effort to find something related to this but have had no luck.
I've asked in the wireless networking how to get the network manager to recognize the ndiswrapper installed system but have gotten zero responses.
The reason I need this to be simple is because my computer is used by others who aren't so computer literate (even less than me) and I'd like them to be able to just click on an icon, enter the root password and everything happen automatically,
I'd actually PREFER not having to share the root password but since I can't find an answer to the wireless network gui question this is my next approach.
Would someone please help me?
Thanks so much.