Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 03-21-2011, 12:04 PM   #1
Registered: Aug 2009
Posts: 537

Rep: Reputation: 32
How to write a script which will take in the password automatically?


I have a script under /etc/init.d/jboss

When I start the Jboss under my user account (assumed test) I type:
[test ~]#/etc/init.d/jboss start
And it will ask me for paaword:
And I have to type the password.

I find this is quite boring. So I want to write a script locally (assumed called myJboss) so when I want to start the Jboss I just type in:
[test ~]#myJboss start [password]
And this script will not ask me for password anymore.


Old 03-21-2011, 12:11 PM   #2
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,504
Blog Entries: 1

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179

I believe this is relevant to your issue. I've never had to use it though, so I'm unsure of how to give you an example.


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
Automatically mount and write to drives without a password AGazzaz Ubuntu 3 09-22-2009 09:57 AM
i need to write a script that automatically logins venix Linux - Newbie 3 03-03-2009 02:34 PM
need help to write script to check the process health and automatically restart it dragondad Programming 3 11-01-2006 01:23 PM
write a script to automatically post to a blog??? Hosiah Linux - General 11 10-14-2005 12:30 PM
i need to write a program it has to execute automatically ykirankumar Linux - Software 5 08-31-2004 01:34 AM

All times are GMT -5. The time now is 07:46 PM.

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