4

interactive bash script to ask for superuser password

view full story
linux-howto

http://www.linuxquestions.org – Hi everyone. This is an old question asked many times, which, however, is NEVER answered directly in any manual I've checked. So... I'm writing a bash install script (instead of a rpm or .deb package) that must be run by a normal user. Then at a certain point the script needs to change to superuser (asking for password and receiving it) and the rest of the script to be executed in the superuser mode in order to install what I mean to install. I know how `sudo ...` or `su `root -c "..."` or `gnome-terminal -e ...` can achieve this purpose by creating certain batch files and then g (HowTos)