Operating System - HP-UX
1827804 Members
2417 Online
109969 Solutions
New Discussion

Re: Several questions about Unix fundermental

 
SOLVED
Go to solution
Wang,MinJie
Super Advisor

Several questions about Unix fundermental

Hi all, I'm trying to figure out some Unix basic question:
1. Which of the following entries are valid in .rhosts or /etc/hosts.equiv?
A. -
B. *
C. ?
D. ?
E. *

2. Is the following statement true?
init never restart failed process

3. "stty" command read termcap database and get the keyboard setting. Is that true?

Can you help me and explain it ?

Tks in advance

9 REPLIES 9
Patrick Wallek
Honored Contributor

Re: Several questions about Unix fundermental

Check the man pages.

1) man host.equiv

2) man init

3) man stty

If you have questions after reading the man pages, please come back then and ask about what you do not understand.
Wang,MinJie
Super Advisor

Re: Several questions about Unix fundermental

Hi Patrick

1. I think none of the entries is valid

2. I don't find any information from the manual page about whether it will restart the failed process. If you know, could you quote it here

3. The same problem. I can't find any information about this question from the manual

I'll very appreciate if you can help me
Jeeshan
Honored Contributor

Re: Several questions about Unix fundermental

Hi

.rhosts entry will be like this

a warrior never quits
Wang,MinJie
Super Advisor

Re: Several questions about Unix fundermental

Hi ahsan

So you think all of the entries are invalid?
TTr
Honored Contributor

Re: Several questions about Unix fundermental

1. I think only A is valid. If any of the others work I 'd consider it a security issue.

2. man inittab (not man init). Note tha the respawn must be set for the process. It depends what you mean by a failed process. If the process is running and has not exited completely, init will not restart it regardles of what the state of the process is.

3. man stty and read the comments at the top of the /etc/termcap file
Dennis Handly
Acclaimed Contributor

Re: Several questions about Unix fundermental

>1. I think none of the entries is valid

It's right there on the man page and in the examples. The only special chars are "-", "+" and "@".
http://docs.hp.com/en/B2355-60130/hosts.equiv.4.html

>2. ... whether it will restart the failed process.

Look for "respawn". Also look at inittab(4):
http://docs.hp.com/en/B2355-60130/inittab.4.html
TTr
Honored Contributor

Re: Several questions about Unix fundermental

> Dennis: 1. I think none...

1.A. -

The "-" is preceeding the hostname. I 'll grant you that it is not very visible and easily missed.
Eric SAUBIGNAC
Honored Contributor
Solution

Re: Several questions about Unix fundermental

Bonjour Wang,

1) I guess that only the first one is valid (A. - ) BUT it will DENY access to since it has a "-" before. Meta "+", "-", "+@" and "-@" are valid. "*" and "?" are not valid meta. Really, you should consult "man .rhosts".

2) false. If a process has the field "action" initialized with the value "respawn" in /etc/inittab, init will try to restart it when it ends. see "man inittab"

3) Not exact. Historically, "stty" was a tool to control rs232 settings and some input and outputs formattings. For exemple, you can specify baud rate, map input CR as CRLF, disable echo of characters, etc ... But with stty you can't send special sequences to the screen, for example to have bold characters at screen, nor map any keyboard key to whatever you want. And of course, "man stty" :-)

Eric
TTr
Honored Contributor

Re: Several questions about Unix fundermental

What did I do wrong and was sent to the corner?