Re: using zenity to write a sudo script ??



On Sat, Dec 22, 2007 at 12:44:37AM -0500, William Case wrote:
> # Open nautilus as root from user account
> # file name: RootBrowse
> 
> sudo -K
> if zenity --entry \
> 	--title="Browse files as root" \
>     --text="Enter your user _password:" \
>     --entry-text "" \
>     --hide-text 
>     then $1 | sudo nautilus --no-desktop --browser \

that would need sudo -S, see man sudo

Not sure where you'd expect $1 to be defined.

> 	 1> /dev/null 2> /dev/null
>     else zenity --error --text="Sorry, wrong password";
> 		exit 1
> fi   
> 
> # End

-- 
Regards,
Olav


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]