[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: How to pass a password to `mount`?
From:       "Mark A. Taff" <marktaff () comcast ! net>
Date:       2005-02-20 4:06:19
Message-ID: 200502192006.19359.marktaff () comcast ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 19 February 2005 19:52, Brad Hards wrote:
> On Sun, 20 Feb 2005 14:26 pm, Mark A. Taff wrote:
> > I have created an encrypted file (/dev/loop0), but kde will not pass or
> > prompt for a password before trying to mount the device.  So I am writing
> > a quick perl script to do this with KDialog's help.
> >
> > The sticking point is I can't even figure out how to pass a password to
> > mount on the command line.  man mount says:
>
> I'm not sure I understand what you want to do. Do you want to pass the
> password from standard in? If so, the filedescriptor for standard in is 0.
>
> Brad

In a shell, `mount /dev/loop0` will prompt me for a password, which I have to 
enter.  I would like to be able to use kdiskfree to specify the mount command 
as the script I'm writing.  Kdialog would then prompt for a password.

The key diff here is that according to man mount, you can specify the password 
within the mount command itself.

The ultimate goal is I don't want to have to go to a cli to mount this, unless 
I choose to.  I'd like a nice gui for it. 

Here is how I have perl setup to call mount right now:

@args = ("mount", "$ARGV[0]",
"$ARGV[0]");
system(@args) == 0
  or die "system @args failed: $?"

Where argv[0] is /dev/loop0 and argv[1] would be the password.


Thanks.
-- 
Mark A. Taff

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic