LinuxQuestions.org
Review your favorite Linux distribution.
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-26-2007, 12:09 PM   #1
kristof_v
Member
 
Registered: Feb 2006
Location: Belgium
Distribution: Debian
Posts: 84

Rep: Reputation: 15
pass vars to application


hi,

I'm creating a shell script that asks the user for a username and a passwd.
these values are then stored in $USERNAME and $PASSWD

Then I want to run the following tool to create a pure-ftp user: pure-pw useradd <user> ..
pure-pw useradd then prompts two times for a password.

now what I want to do is to pass the $USERNAME and $PASSWD to pure-pw useradd so that it uses these values.

But how do you do this?
 
Old 03-26-2007, 12:37 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if there really is no other way to supply a password, then you can use expect to read the questions / prompts and reply accordingly.
 
  


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
Application for Secure Storage of Pin's, Pass, etc.. eldaria Linux - Software 2 12-28-2006 08:10 AM
questions on GCC-3.4.3 - Pass 2 and Binutils-2.15.94.0.2.2 - Pass 2 satimis Linux From Scratch 7 12-26-2005 09:23 PM
Planning to change root pass and oracle system pass sathyguy Red Hat 1 12-20-2005 09:53 PM
pass locale info to a specific application? Peff Linux - Software 2 06-24-2005 04:40 AM
Environment vars AMDPwred Linux - General 2 02-28-2003 07:11 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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