LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-28-2005, 11:32 AM   #1
Mattentaart
LQ Newbie
 
Registered: Dec 2003
Location: Geraardsbergen/Ghent, Belgium
Distribution: Ubuntu 5.10
Posts: 22

Rep: Reputation: Disabled
Gambas: reading a shell password


hey,
I'm writing a simple program in Gambas:
i want a nice gui for a shellcommand, being "sudo vpnc"
as you can see, I have to "sudo" the command, so in a console it asks me to enter my password:
Code:
benjamin@Benjamin:~$ sudo vpnc
Password:
now I know how to execute the command in gambas:
Code:
SHELL "sudo vpnc"
but how do you fill in the password?
I tried about everything I could think of, but sadly my programming skills are nil to none.

I would really appreciate the help!
 
Old 10-29-2005, 11:02 PM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
I'm thinking maybe you should make the script owned by root and give it setuid permissions, so that it executes as root and you don't have to use sudo.
 
Old 10-30-2005, 05:39 AM   #3
Mattentaart
LQ Newbie
 
Registered: Dec 2003
Location: Geraardsbergen/Ghent, Belgium
Distribution: Ubuntu 5.10
Posts: 22

Original Poster
Rep: Reputation: Disabled
perhaps a stupid question, but how do I do that?

can I just program it as root and then set it so every user can run it or is there a special command?

thanks for the idea

Last edited by Mattentaart; 10-30-2005 at 04:40 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reading/writing a shell password in gambas den_benne Programming 2 11-09-2005 03:58 PM
reading file written by shell using C kapil_dev Programming 9 09-10-2005 12:11 AM
Reading text from a file using shell scripting. mrobertson Programming 11 06-29-2005 12:12 PM
reading password-encrypted powerpoint files? JustinHoMi Linux - Software 2 02-22-2005 01:27 PM
Shell Script: Reading Pdf files funkymunky Programming 8 06-18-2004 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration