Bugzilla – Attachment 46927 Details for
Bug 13143
Add a tool to show a Koha's password
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13143 - Detect if the password is in a pipe
Bug-13143---Detect-if-the-password-is-in-a-pipe.patch (text/plain), 1.88 KB, created by
Mark Tompsett
on 2016-01-19 19:31:42 UTC
(
hide
)
Description:
Bug 13143 - Detect if the password is in a pipe
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-01-19 19:31:42 UTC
Size:
1.88 KB
patch
obsolete
>From 5b574343b066dc52a474aca2f0ea3aafd758e98e Mon Sep 17 00:00:00 2001 >From: Liz Rea <liz@catalyst.net.nz> >Date: Tue, 7 Jul 2015 13:06:36 +1200 >Subject: [PATCH] Bug 13143 - Detect if the password is in a pipe > >1. cd kohaclone/debian/scripts >2. sudo koha-passwd instance | cat > Output should be password only >3. sudo koha-passwd instance > Output should be "Password for $instance is: $password" > >Does this get at what you were wanting, Robin? > >NOTE: >$ cd ~ >$ sudo mkdir /etc/koha >$ sudo mkdir /etc/koha/sites >$ sudo mkdir /etc/koha/sites/library >$ sudo ln -s ~/koha-dev/etc/koha-conf.xml /etc/koha/sites/library/koha-conf.xml >$ sudo mkdir /usr/share/koha >$ sudo ln -s ~/kohaclone/debian/scripts /usr/share/koha/bin > >This will fake out your system enough to get koha-passwd to run in your git >system. Since you are using your git system, no need for the sudo's in >steps 2 & 3. And no need to roll a custom build to test it. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > debian/scripts/koha-passwd | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > >diff --git a/debian/scripts/koha-passwd b/debian/scripts/koha-passwd >index b9faa02..5be04b4 100755 >--- a/debian/scripts/koha-passwd >+++ b/debian/scripts/koha-passwd >@@ -45,11 +45,15 @@ EOF > for name in "$@" > do > if is_instance $name ; then >- passwd=$(xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/$name/koha-conf.xml); >- echo "Password for $name: $passwd" >- echo "Press enter to clear the screen..." >- read anykey >- clear >+ passwd=$(xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/$name/koha-conf.xml); >+ if [ -t 1 ]; then >+ echo "Password for $name: $passwd" >+ echo "Press enter to clear the screen..." >+ read anykey >+ clear >+ else >+ echo "$passwd" >+ fi > else > warn "Unknown instance $name." > fi >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13143
:
32682
|
32685
|
32686
|
32687
|
33019
|
33020
|
33962
|
33963
|
33964
|
36435
|
40817
|
46924
|
46925
|
46926
|
46927
|
46985
|
46986
|
46987
|
46988