Friday, September 16, 2016

[389-commits] admserv/cfgstuff man/man8

admserv/cfgstuff/ds_removal.in | 7 ++++++-
admserv/cfgstuff/ds_unregister.in | 7 ++++++-
man/man8/ds_removal.8 | 2 +-
man/man8/ds_unregister.8 | 2 +-
4 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 97f4cb38b074ac14fede429ad56114cba357cfab
Author: Noriko Hosoi <nhosoi@redhat.com>
Date: Tue Sep 13 18:30:48 2016 -0700

Ticket #48988 - ds_removal and ds_unregister should support prompting for password

Description: Letting ds_removal and ds_unregieter accept '-w -' to
prompt for the Admin Password.

https://fedorahosted.org/389/ticket/48988

Reviewed by wibrown@redhat.com (Thanks, William!!)

diff --git a/admserv/cfgstuff/ds_removal.in b/admserv/cfgstuff/ds_removal.in
index c4c52cb..9c2a042 100755
--- a/admserv/cfgstuff/ds_removal.in
+++ b/admserv/cfgstuff/ds_removal.in
@@ -39,7 +39,7 @@

Usage()
{
- echo "Usage: $0 [-f] -s server_id -w admin_password"
+ echo "Usage: $0 [-f] -s server_id -w admin_password | -w -"
echo " server_id: Directory server identifier; slapd-<server_id>"
echo " admin_password: Administration user password"
echo " -f - force - optional - ignore errors and force removal of as much as possible"
@@ -60,6 +60,11 @@ do
elif [ "$1" = "-w" ]; then
shift
admin_pw=$1
+ if [ "$admin_pw" = "-" ]; then
+ echo -n "Enter Admin Password: "
+ read -s admin_pw
+ echo ""
+ fi
elif [ "$1" = "-f" ]; then
forceflag=1
elif [ "$1" = "-h" -o "$1" = "-H" -o "$1" = "--help" ]; then
diff --git a/admserv/cfgstuff/ds_unregister.in b/admserv/cfgstuff/ds_unregister.in
index 01b1bfd..f8458b7 100755
--- a/admserv/cfgstuff/ds_unregister.in
+++ b/admserv/cfgstuff/ds_unregister.in
@@ -39,7 +39,7 @@

Usage()
{
- echo "Usage: $0 -s server_id -w admin_password"
+ echo "Usage: $0 -s server_id -w admin_password | -w -"
echo " server_id: Directory server identifier; slapd-<server_id>"
echo " admin_password: Administration user password"
}
@@ -58,6 +58,11 @@ do
elif [ "$1" = "-w" ]; then
shift
admin_pw=$1
+ if [ "$admin_pw" = "-" ]; then
+ echo -n "Enter Admin Password: "
+ read -s admin_pw
+ echo ""
+ fi
elif [ "$1" = "-h" -o "$1" = "-H" -o "$1" = "--help" ]; then
Usage
exit 0
diff --git a/man/man8/ds_removal.8 b/man/man8/ds_removal.8
index 13824c4..f20f788 100644
--- a/man/man8/ds_removal.8
+++ b/man/man8/ds_removal.8
@@ -39,7 +39,7 @@ Optional \- Force removal \- ignore errors and remove everything
Required \- server_id \- the directory server identifier \- slapd\-\fIserver_id\fR
.TP
.B \fB\-w password\fR
-Required \- password \- the password for the console admin user
+Required \- password \- the password for the console admin user. If password is '-', prompt for the password.
.br
.SH AUTHOR
ds_removal was written by the 389 Project.
diff --git a/man/man8/ds_unregister.8 b/man/man8/ds_unregister.8
index bfe5f8b..f2bbece 100644
--- a/man/man8/ds_unregister.8
+++ b/man/man8/ds_unregister.8
@@ -33,7 +33,7 @@ A summary of options is included below:
Required \- server_id \- the directory server identifier \- slapd\-\fIserver_id\fR
.TP
.B \fB\-w password\fR
-Required \- password \- the password for the console admin user
+Required \- password \- the password for the console admin user. If password is '-', prompt for the password.
.br
.SH AUTHOR
ds_unregister was written by the 389 Project.

_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org

No comments:

Post a Comment