Drakx
May 4th, 2006, 01:10 PM
Hi
Im doing a little shell scripting and so far its all been good and fun till i wanted root access :confused: Ive googled around and must have asked the wrong question cause what i got back was not the answer ive been looking for, all i want is to get root access via the script so the end user can run say drakx.sh and the script asks the user for the root password so the script can do all it needs to :)
What ive done so far is some thing like this...
echo -n "Please enter your root password: "
read rootPass
sudo
Thats one way i've taken it and here is the other
sudo
echo -n "Please enter your root password: "
read rootPass
So any help at all would be great
Thanks.
Im doing a little shell scripting and so far its all been good and fun till i wanted root access :confused: Ive googled around and must have asked the wrong question cause what i got back was not the answer ive been looking for, all i want is to get root access via the script so the end user can run say drakx.sh and the script asks the user for the root password so the script can do all it needs to :)
What ive done so far is some thing like this...
echo -n "Please enter your root password: "
read rootPass
sudo
Thats one way i've taken it and here is the other
sudo
echo -n "Please enter your root password: "
read rootPass
So any help at all would be great
Thanks.