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
KRB5-SYNC-BACKEND(8)						     krb5-sync						      KRB5-SYNC-BACKEND(8)

NAME
krb5-sync-backend - Manipulate Kerberos password and status change queue SYNOPSIS
krb5-sync-backend -h krb5-sync-backend (disable|enable) user krb5-sync-backend (help|list) krb5-sync-backend [-s] process krb5-sync-backend password user ad < password krb5-sync-backend purge days DESCRIPTION
krb5-sync-backend provides an interface to the queue of pending password and account status changes written by either this utility or by the synchronization plugin after failures. It can queue account enables, disables, or password changes for Active Directory, list the queued actions, or process the queued actions with krb5-sync (telling it to take its action from a file). The queue directory will contain files with names in the format: <username>-<domain>-<action>-<timestamp>-<count> where <username> is the name of the affected account ("/" will be replaced with "." in the file name and the realm will be removed), <domain> is "ad", <action> is either "enable" (used for both enabling and disabling accounts) or "password", <timestamp> is a ISO 8601 timestamp in UTC, and <count> is a two-digit zero-padded number between 0 and 99 (so that we can handle multiple changes that arrive in the same second). Each file contains a queued change in the format described in krb5-sync(8). Supported arguments to krb5-sync-backend are: disable user Queue a disable action (in Active Directory, as that's the only system currently supported for enable and disable) for user. enable user Queue an enable action (in Active Directory, as that's the only system currently supported for enable and disable) for user. help List the supported commands. list List the current contents of the queue. process Process the queue. All queued actions will be sorted alphanumerically (which due to the timestamp means that all changes for a particular user of a particular type will be done in the order queued). krb5-sync will be called for each queued action, as long as it continues to succeed. If it fails for a queued action, all other actions sharing the same username, domain, and action will be skipped and queue processing will continue with the next action that differs in one of those three parameters. password user ad < password Queue a password change for user in Active Directory, setting their password to password. By default, password is read from standard input. It can also be passed as a command-line argument, but this is less secure since the password is then readable by anyone on the system who can see the command-line arguments of processes. The entire standard input is taken as the password, including any trailing newlines, so be careful how the password is provided. If using something like echo, use "echo -n" or the "c" flag, depending on your system. purge days Delete all queued actions last modified longer than days days ago. This can be used to clean up old failed change propagations in situations where accounts may be created or have password changes queued that are later removed and never created in other environments. OPTIONS
-h, --help Display this documentation (by running this script through "perldoc -t" and exit. All other options and commands are ignored. -s, --silent When running the process command, filter out the output of krb5-sync to ignore common errors and success messages and only show uncommon errors. This option will filter out all output when krb5-sync is successful and will filter out error messages matching: ^AD password change for S+ failed (3):.*Authentication error$ ^AD status change for S+ failed (1): user .* not found in S+$ even when it fails. (This message generally means the account doesn't exist in Active Directory.) The regexes can be modified at the start of this script. FILES
/usr/sbin/krb5-sync The path to the krb5-sync utility. This may be changed at the top of this script. /var/spool/krb5-sync The default path to the queue. This must match the queue_dir parameter in krb5.conf used by the plugin. It can be changed at the top of this script. /var/spool/krb5-sync/.lock An empty file used for locking the queue. When writing to or querying the queue, krb5-sync-backend will open and lock this file with the Perl flock function, which normally calls flock(2). Any other queue writers need to use the same locking mechanism for safe operation. SEE ALSO
krb5-sync(8) The current version of this program is available from its web page at http://www.eyrie.org/~eagle/software/krb5-sync/ <http://www.eyrie.org/~eagle/software/krb5-sync/>. AUTHOR
Russ Allbery <rra@stanford.edu> 2.2 2012-01-10 KRB5-SYNC-BACKEND(8)
All times are GMT -4. The time now is 06:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy