04-07-2009
Run it from a C program
pipe(), fork(), dup the read part of the pipe on to the child's stdin, exec() in child with the parameters you have, and then write the username and password to the child process's stdin via the pipe.
The username and password WILL be visible in the text of the program, so if you can make it executable but not readable except by root, something like mode 0511? It can be executed by others, but the file can't be read. (I tried this on my openbsd system, and w/ mode 0111, I could run it.)
You may have to figure out what to do with the child's stdout. There are other issues to investigate, possibly, like detaching from the terminal, perhaps, and maybe daemon()'izing it.
HTH
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm calling a program with a command line arguement containing a password. while the process is running anyone on the system can ps -ef and see the password. Is there a way to prevent this from happening.
example
PROGRAM USERNAME/PASSWD
I've also tried
PROGRAM `cat passfile`
... (7 Replies)
Discussion started by: sudojo
7 Replies
2. IP Networking
Is there anyone who knows how to hide an IP from being logged by the site you are visiting. I know of some paid companies but I am looking for a different solution. Is there some way in UNIX to mask the ip.
Help this is urgent.
Datopdog (1 Reply)
Discussion started by: datopdog
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I am trying to figure out away to hide a command from users when performing a ps check. I have a ksh that purges a table in a database. If I perform a >ps -eaf |grep ksh, I get the login id and password. I do not want other users seeing this. Is there a way to hide this. The login... (5 Replies)
Discussion started by: ctcuser
5 Replies
4. Shell Programming and Scripting
Hi,
I have a simple script to ftp from unix to a mainframe to get and put files. Currently I have the password setup in a VARS file and dereference the var in my script. Doing it this way allws me to change the password in only one place but it is still viewable for many people. Is there any... (6 Replies)
Discussion started by: Cass3
6 Replies
5. Shell Programming and Scripting
Hi,
I have a directory i want to just hide this directory.
Could you please tell me the command to hide directory. (2 Replies)
Discussion started by: shivanete
2 Replies
6. UNIX for Dummies Questions & Answers
Hello all ,
I looked up this site for solutions to hide login info from ps -ef | grep like using a seperate file and store the password in that especially for oracle sqlplus scripts.
I just got this thought , But dont know how to implement this in UNIX.
Is there a way to revoke access from... (17 Replies)
Discussion started by: simonsimon
17 Replies
7. Programming
class B
{
public:
void fns(void){//base def;}
};
class D:public B
{
public:
void fns(void) {//new def;}
};
I was thinking the above is overriding but somewhere else i found the above is just hiding.Only virtual functions can be considered as overriding?
This is the exact statement ... (1 Reply)
Discussion started by: johnbach
1 Replies
8. Shell Programming and Scripting
Hi,
I currently have a UNIX script with a function that uses a username and password to connect to the database, retrieve some information and then exit.
At the moment, am getting the username and password from a hidden plain text file and permission set to -r--------, i.e. read only to who... (1 Reply)
Discussion started by: newbie_01
1 Replies
9. Shell Programming and Scripting
Not sure on the description, but here is a quick rundown.
I have 2 servers, we'll call them
serverA
serverB
On serverB, I am calling a script that inside it has the following:
ssh srvdsadm@serverB sudo -u dsadm /opt/apps/DataStage/scripts/autoDeploy.sh ${projName} ${subProjVar}... (1 Reply)
Discussion started by: cbo0485
1 Replies
10. Shell Programming and Scripting
Hi guys,
I use STTY command to make the password invisible.
Now I need to write the password into another file pwd.txt, but in an invisible manner, something like ******. Another thing is to when I echo the content of pwd.txt I get the password I actually typed.
Thanks guys. Help me out. (5 Replies)
Discussion started by: mohanalakshmi
5 Replies
LEARN ABOUT DEBIAN
jifty::plugin::authentication::password::view
Jifty::Plugin::Authentication::Password::View(3pm) User Contributed Perl Documentation Jifty::Plugin::Authentication::Password::View(3pm)
NAME
Jifty::Plugin::Authentication::Password::View - views for password plugin
DESCRIPTION
This provides the templates for the pages and forms used by the password authentication plugin.
TEMPLATES
signup
Displays a sign-up form.
login
Displays the login form.
login_widget
A handy template for embedding the login form. Just include it in your templates via:
show('/login_widget');
See Jifty::Plugin::Authentication::Password::Action::Login.
let/reset_lost_password
After requesting a password reset and clicking on the link sent by email, this receives that click and provides the form for resetting the
password.
See Jifty::Plugin::Authentication::Action::ResetLostPassword.
let/confirm_email
Handles the work of confirming an email address for a new account.
See Jifty::Plugin::Authenticaiton::Password::View.
lost_password
Starts the process of sending a link to reset a lost password by email.
See Jifty::Plugin::Authentication::Password::SendPasswordReminder.
resend_confirmation
Request a new email confirmation message be sent to your email account.
See Jifty::Plugin::Authentication::Password::Action::ResendConfirmation.
SEE ALSO
Jifty::Plugin::Authentication::Password, Jifty::Plugin::Authentication::Password::Dispatcher
LICENSE
Jifty is Copyright 2005-2010 Best Practical Solutions, LLC. Jifty is distributed under the same terms as Perl itself.
perl v5.14.2 2010-12-10 Jifty::Plugin::Authentication::Password::View(3pm)