LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-21-2007, 01:30 PM   #1
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Rep: Reputation: 58
python gtk program almost done, stuck at os.popen? Maybe?


Hey guys,
I'm just about done with my DM-Crypt / LUKS wrapper gui.
I'm just stuck at one step. I need to run:

cryptsetup --verbose --cipher 'aes-cbc-essiv:sha256 _
--key-size 256 --verify-passphrase luksFormat /dev/loop0

some of the above is in variables but thats neither here nor there. I can run it w/o the --verify-passphrase option but that is pointless because when u do luksOpen you have to enter a password anyway.

I tried:
cmd = <above cryptsetup command>
a = os.popen(cmd, "w")
a.write(password) #For First Prompt
a.write(password) #For Second Prompt

Turns out, this doesn't work.
Can someone help me figure out how I can pass the password to the prompts when the prompts are displayed?

I've been searching the net and I haven't found anything that I understand.

Thanks for you help,
nomb
 
Old 03-22-2007, 02:44 PM   #2
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Original Poster
Rep: Reputation: 58
I just wanted to clarify one thing:

When I run the cryptsetup command, it says can not verify passphrase on a non-tty terminal. Is there another way around this? Or does anyone know how to use os.execv command?

nomb
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem with python program--gtk.glade? David the H. Linux - Software 2 02-08-2007 08:18 AM
Getting GTK to work with python crazyjimbo Programming 4 11-27-2006 12:14 PM
WineX, python-gnome, and python-gtk DrD Fedora 0 08-03-2004 12:11 PM
GTK Doesn't Update? Stuck on 1.2.7 GT_Onizuka Linux - Software 3 11-22-2003 02:38 PM
Gtk-Warning but program still works... I close konsole, program closes Laptop2250 Linux - Software 2 11-14-2003 11:18 PM


All times are GMT -5. The time now is 06:30 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration