How to (GUI) prompt for password from bash?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to (GUI) prompt for password from bash?
# 1  
Old 04-16-2013
How to (GUI) prompt for password from bash?

I remember there was a gnome only command that we could insert in a bash script to mount a Linux disk that would pop up a little window to grab a password.

I know there are bash commands to read a string but they are not GUIs and they echo the characters typed. This gnome command popped up a window and echoed the key strokes with "*"'s.

Can someone remind of me of the name of that gnome command that pops up a password GUI? Does it have counterparts for other windows managers (besides gnome) and Cygwin?

These days I'm running Cygwin bash under windows 8. I'm launching the bash scripts from the emacs compile command. These bash scripts run sqlplus (Oracle) and sqlcmd (Microsoft) scripts to create databases and database users and they require passwords be specified on the command line for sqlplus/sqlcmd. I'd like to pop up a little GUI that will prompt for a password. Is there a open source Cygwin/bash friendly GUI that will prompt for a password and insert the results via the bash backquote feature?

Thanks
Siegfrried
# 2  
Old 04-16-2013
The gnome command may have been gsudo, which doesn't return a password as much as check a password.

Since you're using BASH, may I suggest read -s ? That will echo no characters.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Make a password protected bash script resist/refuse “bash -x” when the password is given

I want to give my long scripts to customer. The customer must not be able to read the scripts even if he has the password. The following command locks and unlocks the script but the set +x is simply ignored. The code: read -p 'Script: ' S && C=$S.crypt H='eval "$((dd if=$0 bs=1 skip=//|gpg... (7 Replies)
Discussion started by: frad
7 Replies

2. Solaris

Solaris machine is at # prompt not able to login in GUI mode

Solaris machine is at # prompt not able to login in GUI mode : I want to login solaris server in GUI mode from # prompt. ---------- Post updated 12-30-11 at 11:36 AM ---------- Previous update was 12-29-11 at 02:23 PM ---------- Hi, Please send me some guidelines regarding this.... as... (2 Replies)
Discussion started by: sunray
2 Replies

3. UNIX for Advanced & Expert Users

Changing the password prompt

Is there any way I can change the prompt which asks for the password on a UNIX system? e.g. When I login using Telnet instead of "Password" I should get "Correct Password". Thanks, Vineet (3 Replies)
Discussion started by: vineetd
3 Replies

4. OS X (Apple)

get around rsync password prompt

Hey there, I'm trying to do a very simple rsync to back up my computer to an external drive connected via usb every night, but it keeps asking for a password. I tried using the password file flag, but it looks like that is only a daemon. Does anyone have any ideas? This has eaten up a lot of my... (4 Replies)
Discussion started by: aarond
4 Replies

5. Shell Programming and Scripting

rsync without password prompt

Hi, I am tranfering the files from local machine to remote machine using rsync utility but it is prompting password. but i don't want to provide through prompt. how can i give in my shell script. can anyone suggest me.Thanks in advance rsync -rvcpogtl -e "ssh $LOCAL_PORT" $SOURCE_DIR... (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

6. OS X (Apple)

Bash script prompt for sudo password?

I'm making a script that will be a double clickable .command file and I need it to prompt for the users admin password. So far I have: if ]; then sudo -p "Please enter your admin password: " date 2>/dev/null 1>&2 if ; then echo "You entered an invalid password... (2 Replies)
Discussion started by: PatGmac
2 Replies

7. UNIX for Advanced & Expert Users

Stopping password prompt

hi I have installed a new Linux machine and having another machine having Solaris on it. i want that when i log into my solaris machine using rlogin from Linux machine then no password prompt occurs... Thanks in advance. (4 Replies)
Discussion started by: rochitsharma
4 Replies

8. Shell Programming and Scripting

any way to use SU command without prompt for password

Hi, First i want to tell you i am not a administrator and everytime to run a sqlscritpt i have to login as SU in a particular account to connect to sqlplus.. I want to write a script which can make me free by doin this .. since i am having the permission for SU i want to know if i can SUDO... (7 Replies)
Discussion started by: myelvis
7 Replies

9. IP Networking

Unable to get password prompt

Hi I am using a Solaris 2.5.1 and i am unable to logon on the console. When i key in say, root on the login prompt, it does not prompt me for password but instead return to the login prompt again. Please help. thanks (2 Replies)
Discussion started by: owls
2 Replies

10. UNIX for Dummies Questions & Answers

rcp without password prompt

Hi, i have a request about rcp. is it possible to to make a rcp sessions for a normal user witch should have this option without a password prompt. what are the important steps .... add the host and user i the .rhosts and and . . . . many thx (1 Reply)
Discussion started by: scottl
1 Replies
Login or Register to Ask a Question