Sponsored Content
Full Discussion: Problem with a script
Top Forums UNIX for Beginners Questions & Answers Problem with a script Post 303044873 by Chubler_XL on Thursday 5th of March 2020 09:11:34 PM
Old 03-05-2020
I have had some success with prompting for the password (without username) from sudo like this:

Code:
$ cat /usr/local/bin/zenity_passphrase
#!/bin/bash
zenity --password --title="sudo password prompt" --timeout=10
$ export SUDO_ASKPASS=/usr/local/bin/zenity_passphrase
$ sudo -A id
<GUI prompt for password>
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
$

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problem starting a script from a 'main'-script

Please Help! :o I have a main script (ksh) where another script is called (convert_picture). Normally this works ok, but since some changes has been made on the unix-server (I dont know what :( ) suddenly it doesnt work anymore: i get an error message: ksh: convert_picture not found. I am... (3 Replies)
Discussion started by: Rakker
3 Replies

2. Shell Programming and Scripting

Help. Script problem

hey guys. i have a bunch of programs in a script that needs to run as root and the rest as another user, we'll call him gabriel. now, in this script, i want to run the first few lines as root. now, how do i, after running as root, tell the script to run the remaining lines as the user gabriel?... (3 Replies)
Discussion started by: Terrible
3 Replies

3. Shell Programming and Scripting

ssh script problem problem

Hi Please help me with the following problem with my script. The following block of code is not repeating in the while loop and exiting after searching for first message. input_file ========== host001-01 host001-02 2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies

4. Shell Programming and Scripting

call shell script from perl cgi script problem

hi,, i have perl scipt with line : system('./try.sh $t $d $m'); in shell scipt try.sh i have the line: echo $1 its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies

5. UNIX for Dummies Questions & Answers

Problem with script

Hello All. I have a script that is suppossed to start up a daemon but when executed, simply hangs. Could you please take a look and let me know where the problem might be? TIA ################################################################### # # SCRIPT: dstart3000.sh # Bring up the Domain... (6 Replies)
Discussion started by: grin1dan
6 Replies

6. Shell Programming and Scripting

Problem running a program/script in the background from a script

Hi all, I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes... (5 Replies)
Discussion started by: newbie_01
5 Replies

7. Shell Programming and Scripting

Problem while calling a script within a script

Hi , I have moduled my scripts in three scripts . From First script i am calling second and from second i am calling third for some check . Problem is with the third script call. ---In second script EXP ='test.\abc.\Server.*abc.xml.*' pid=$($HOME/bin/checkpid $EXP) --Third... (2 Replies)
Discussion started by: amrishn
2 Replies

8. Shell Programming and Scripting

Script problem

Hi all, I have a script that I was using in Mandriva and my script worked perfectly well but then I changed to using Puppy Linux and it isn't running the way I thought it would. In Puppy Linux operating system I've encountered a few problems, first problem is the elif for option B isn't... (4 Replies)
Discussion started by: Chrissie
4 Replies

9. Shell Programming and Scripting

Shell script newbie, what is problem with my script?

Hello, Ubuntu server 11.10 can anybody help what is problem with my shell script? #!/bin/bash #script to find out currently logged on user is root or not. if ] then echo "You are super" else echo "You are awesome!" fi When I run script, I get following output ./uid: line 3: I... (4 Replies)
Discussion started by: kaustubh
4 Replies

10. Shell Programming and Scripting

Problem in calling a script inside a script

Hi team, I have a script in different folder. Now i want to call that script and execute that script from that path alone. My code is #!/bin/bash wname=yahoo PATH='/opt/IBM' wac=`/usr/bin/ls $PATH | /usr/bin/grep "$wname"` STOP=`/usr/bin/find $PATH/$wac -type f -name "stop.sh"`... (8 Replies)
Discussion started by: natraj005
8 Replies
PAM_TACPLUS(8)						    BSD System Manager's Manual 					    PAM_TACPLUS(8)

NAME
pam_tacplus -- TACACS+ authentication PAM module SYNOPSIS
[service-name] module-type control-flag pam_tacplus [options] DESCRIPTION
The pam_tacplus module provides authentication services based upon the TACACS+ protocol for the PAM (Pluggable Authentication Module) frame- work. The pam_tacplus module accepts these optional parameters: use_first_pass causes pam_tacplus to use a previously entered password instead of prompting for a new one. If no password has been entered then authentication fails. try_first_pass causes pam_tacplus to use a previously entered password, if one is available. If no password has been entered, pam_tacplus prompts for one as usual. echo_pass causes echoing to be left on if pam_tacplus prompts for a password. conf=pathname specifies a non-standard location for the TACACS+ client configuration file (normally located in /etc/tacplus.conf). template_user=username specifies a user whose passwd(5) entry will be used as a template to create the session environment if the supplied username does not exist in local password database. The user will be authenticated with the supplied username and password, but his credentials to the system will be presented as the ones for username, i.e., his login class, home directory, resource limits, etc. will be set to ones defined for username. If this option is omitted, and there is no username in the system databases equal to the supplied one (as determined by call to getpwnam(3)), the authentication will fail. FILES
/etc/tacplus.conf The standard TACACS+ client configuration file for pam_tacplus SEE ALSO
passwd(5), tacplus.conf(5), pam(8) HISTORY
The pam_tacplus module first appeared in FreeBSD 3.1. AUTHORS
The pam_tacplus manual page was written by Andrzej Bialecki <abial@FreeBSD.org> and adapted to TACACS+ from RADIUS by Mark R V Murray <markm@FreeBSD.org>. The pam_tacplus module was written by John D. Polstra <jdp@FreeBSD.org>. BSD
August 2, 1999 BSD
All times are GMT -4. The time now is 08:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy