06-03-2014
Quote:
Originally Posted by
belalr
Hi,
I have the following segment of a script which is supposed to prompt a user for password and then capture the password entered by the user.
The function is called in by another script and used to work without issue, the problem is that recently the script is not waiting for the user to input the password it and immediately the calling script is giving an error that null password is provided.
Can someone please help?
The reason must be that a "\n" or ENTER key is still in the stdin buffer by the time that it gets to
$password = <STDIN>; which then it gets removed by
chomp($password); returning
null
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I'm writing a script and I've put #!/bin/bash as the first line so that I can just type my scripts name 'whodate' at PS1 instead of ./whodate. This has suddenly stopped working for me. It used to be the case that I could start a script with #!/bin/bash and it would work, but for this script... (2 Replies)
Discussion started by: zorrokan
2 Replies
2. Linux
Hi All,
I am user of a Linux machine and I have approximatly 15 cronjobs scheduled in my crontab. Yesterday my administrator made LDAP active on my userid and all the things are doing fine after that. But all cronjobs for my user id stored in my crontab have stopped working after that.
Could... (1 Reply)
Discussion started by: bisla.yogender
1 Replies
3. Shell Programming and Scripting
Hello people,
I had these cronjobs scheduled in some Unix boxes which were running fine until yesterday.But then the password was changed for that user id and then the jobs stopped working. As far as i know cron jobs run from super user. I am completely lost over here now.
Thanks. (2 Replies)
Discussion started by: King Nothing
2 Replies
4. UNIX for Advanced & Expert Users
Hi all,
My server was Debian Etch (4) and had a working suPHP module (version 0.6.2-1). After I dist-upgraded it to Lenny (Debian 5), suPHP (version 0.6.2-3) stopped working. I read in the mailing list that I should change the settings of /etc/suphp/suphp.conf to this form:
;Handler... (1 Reply)
Discussion started by: mjdousti
1 Replies
5. IP Networking
I installed F12 around the time it was released and it picked up my wireless card and worked like a charm.....Suddenly last week everything stopped working and I receive what appears to be a driver error when wlan0 tries to load.
Error for wireless request "Set Mode" (8B06) :
SET failed on... (1 Reply)
Discussion started by: woodson2
1 Replies
6. Ubuntu
Well this is weird. I restarted my dual boot Win7/Ubuntu 10.10 from ubuntu to windows. Everything was working fine and windows is always connecting properly to my lan. After restarting back into Ubuntu, all of a sudden I can't connect to my network. It looks as if its trying to connect through... (15 Replies)
Discussion started by: zixzix01
15 Replies
7. UNIX for Dummies Questions & Answers
I Was able to ssh into the AIX box. now i cannot When I run the command to start it it comes back that is was started, but still does not work. Here is a shot i what i see
# server:/> lslpp -l | grep ssh
openssh.base.client 4.3.0.5201 COMMITTED Open Secure Shell Commands
... (2 Replies)
Discussion started by: fierfek
2 Replies
8. AIX
I have a serial printer connected to a 16 port ran. All of a sudden my printer stopped working and not sure how to get it back. Can anyone help pint me in the write direction?
lsdev -Cc printer gives me the following.
lp0 Defined 0A-08-11-00 Other serial printer
lp1 Defined 0A-08-11-03... (3 Replies)
Discussion started by: Gmanx
3 Replies
9. Solaris
after a new patch set on the 14th. I noticed that mailx stopped working, as far a I can tell that is the only thing that changed.
solaris 10 OS
it seems everything is the same, sendmail seems to be running
root@server # ps -ef | grep -i sendmail
smmsp 687 1 0 10:42:25 ? ... (0 Replies)
Discussion started by: goya
0 Replies
LEARN ABOUT CENTOS
osinfo-install-script
OSINFO-INSTALL-SCRIPT.C(1) Virtualization Support OSINFO-INSTALL-SCRIPT.C(1)
NAME
osinfo-install-script - generate a script for automated installation
SYNOPSIS
osinfo-install-script [OPTIONS...] OS-ID
DESCRIPTION
Generate a script suitable for performing an automated installation of "OS-ID". "OS-ID" should be a URI identifying the operating system,
or its short ID.
By default a script will be generated for a "JEOS" style install.
OPTIONS
--profile=NAME
Choose the installation script profile. Defaults to "jeos", but can also be "desktop", or a site specific profile name
--config=key=value
Set the configuration parameter "key" to "value".
CONFIGURATION KEYS
The following configuration keys are available
"hardware-arch"
The hardware architecture
"l10n-timezone"
The local timezone
"l10n-keyboard"
The local keyboard layout
"l10n-language"
The local language
"admin-password"
The administrator password
"user-password"
The user password
"user-login"
The user login name
"user-realname"
The user real name
"user-autologin"
Whether to automatically login the user
"user-admin"
Whether to give the user administrative privileges
"reg-product-key"
The software registration key
"reg-login"
The software registration user login
"reg-password"
The software registration user password
EXAMPLE USAGE
The following usage generates a Fedora 16 kickstart script
# osinfo-install-script
--profile jeos
--config l10n-timezone=GMT
--config l10n-keyboard=uk
--config l10n-language=en_GB
--config admin-password=123456
--config user-login=berrange
--config user-password=123456
--config user-realname="Daniel P Berrange"
fedora16
EXIT STATUS
The exit status will be 0 if an install script is generated, or 1 on error
AUTHORS
Daniel P. Berrange <berrange@redhat.com>
COPYRIGHT
Copyright (C) 2012 Red Hat, Inc.
LICENSE
"osinfo-install-script" is distributed under the termsof the GNU LGPL v2 license. This is free software; see the source for copying
conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
libosinfo-0.2.7 2013-04-10 OSINFO-INSTALL-SCRIPT.C(1)