Project

General

Profile

Actions

Bug #20805

closed

katello-change-hostname should ask for credentials if not provided

Added by John Mitsch about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1481289

Description of problem:

Currently when changing hostname without specifying username and password:

  1. katello-change-hostname -y newname
    /usr/sbin/katello-change-hostname:191:in `precheck': undefined local variable or method `opt_parser' for main:Object (NameError)
    from /usr/sbin/katello-change-hostname:212:in `<main>'

or

  1. ]# katello-change-hostname newname
    WARNING This script will modify your system. You will need to re-register any clients registered to this system after script completion. Foreman Proxies will have to be re-registered and reinstalled. If you are using custom certificates, you will have to run the -installer again with custom certificate options after this script completes. Have you taken the necessary precautions (backups, snapshots, etc...) and want to proceed with changing your hostname?
    [y/n]:/usr/sbin/katello-change-hostname:191:in `precheck': undefined local variable or method `opt_parser' for main:Object (NameError)
    from /usr/sbin/katello-change-hostname:212:in `<main>'

Expected results:
Some user-friendly message asking user to pass -u and -p options. Possibly, in the interactive mode katello-change-hostname could ask for credentials just after the [y/n] dialog

Actions

Also available in: Atom PDF