We've got some HP-UX Integrity VMs that are difficult to log in to at the console because the KILL character is set to @, which also happens to be a component of some passwords. Now I know we can get around this by logging in as a different user, and issuing stty KILL '^U', and that's already in the .login for all users. I also know that using \@ will work.

The real question is what do I need to do to change the KILL character system-wide so that we don't either have to kludge interactive login or avoid passwords with @?

  • 3
    Either, you could find where KILL is set to @, or you could find a script that is run before you run into problems, and fix the problem there, every time (hoping you are not too early, so it is reset to @!). As an example, on my Debian, I would check out /etc/inittab. Possibly it's the same for you (I don't know HP-UX at all). Well, that's two tracks for you to follow. Nov 7, 2012 at 22:03
  • I do see some stty config in /etc/inittab, but I'll have to do some reading on the init process before I start mucking about in a config file that important. Thanks!
    – Sammitch
    Nov 7, 2012 at 22:45

1 Answer 1


/etc/inittab is the place to start. The getty program is used to handle the initial setup of the terminal.

According to the getty manual page, it has an option which can tell it to use a configuration file that lets the administrator set special characters:

Get the settings for special control characters from the /dev/ttyconf file. See the Special Control Characters section.

That section tells little, but points you to the stty manual page. It has a little more information:

The default values for the control characters may be changed by a user with root capability by using stty and redirecting stdin to the device /dev/ttyconf. Any of the four command forms specified in the Description section above may be used. However, only the control character defaults will be reported or altered. It will have no effect on the defaults for any of the other modes.

and gives an example:

The command:

      stty kill '^X' intr '^C' werase '^W' </dev/ttyconf

sets the default values for the delete-line character to ^X (Ctrl-X), the interrupt character to ^C, and the word erase character to ^W. Any terminal port opened after this command is issued will see these new default values for the kill, intr, and werase control characters.

Given the comments about applying only to terminal ports opened after, that means you'd have to modify /etc/inittab to do this initialization.

According to a cached web search, this is answered in HP's documentation:

HP-UX System Administrator's Guide: Configuration Management: HP-UX 11i Version 3
Chapter 2 Configuring System Parameters
Changing Login Special Characters

and concludes with an example line to add before the lines dealing with the console and terminals:

   ttc0::bootwait:/sbin/stty intr ^C erase ^H kill ^U < /dev/ttyconf

The lines with getty would also have to have the -f option added.

Further reading:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.