root login at console not working (is allowed in /etc/securetty and root password is correct)

by Community Manager on ‎05-23-2013 10:07 AM

Question

I cannot login as root when accessing the console via the MP (management processor).

 

I can su to root after logging in as me. So I know I have the correct root password, etc.

 

As you can see, there is an entry for console in /etc/securetty...


[root@myhost /root] # cat /etc/securetty
console
[root@myhost /root] #

 

And this is the result of trying to login as root on the console (via MP) with the correct password.


Console Login: root
Password:
Login incorrect
login:

 

Any ideas???

 

FYI: This is an rx6600 running HPUX 11.31. 

 

 

Answer

Make sure your password doesn't contain any special characters like @ ! # etc

Comments
by Honored Contributor on ‎12-13-2013 01:03 PM

If the password does contain a "@" or "#" character, type a backslash "\" before it and you might be able to login successfully.

 

(In the login prompt, the terminal control characters are set to the default values, as defined by the old SVID3 standard. In particular, # is the default for "erase character" and "@" for "kill all input on this line and start over". The termio(7) man page says:

If ICANON is set (see Local Modes), the ERASE, KILL, and EOF characters can be escaped by a preceding \ character, in which case no special function is performed.

 The ICANON mode bit is the one that allows the ERASE and KILL characters to work, so using the backslash looks like a viable solution.

 

The HP-UX System Administrator's Guide shows how to change the default values for these special characters to fix this issue permanently.

To do that, you must make some changes to the /etc/inittab file (be very careful when editing it, because mistakes may render the system non-bootable).

You must change these lines:

cons:123456:respawn:/usr/sbin/getty console console       # system console ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600

 to:

ttco::bootwait:/sbin/stty intr ^C erase ^H kill ^U < /dev/ttyconf 
cons:123456:respawn:/usr/sbin/getty -f console console # system console
ttp1:234:respawn:/usr/sbin/getty -f -h tty0p1 9600

 i.e. you must add one line with the stty command to change the default values for all terminal devices in the bootwait phase (a very early system start-up phase), and add the "-f" option to any active "getty" commands to make them actually use /dev/ttyconf instead of built-in defaults.

Search
Showing results for 
Search instead for 
Do you mean 
Follow Us


Twitter Stream
HP Blog
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation