Help answer threads with 0 replies.
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, 11:04 AM   #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, 11:11 AM   #2
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,609
Blog Entries: 1

Rep: Reputation: 1233Reputation: 1233Reputation: 1233Reputation: 1233Reputation: 1233Reputation: 1233Reputation: 1233Reputation: 1233Reputation: 1233

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

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

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