


LOGIN(1)	    Linux Programmer's Manual		LOGIN(1)


NNAAMMEE
       login - sign on

SSYYNNOOPPSSIISS
       llooggiinn [[ name ]]
       llooggiinn --pp
       llooggiinn --hh hostname
       llooggiinn --ff name

DDEESSCCRRIIPPTTIIOONN
       llooggiinn  is used when signing onto a system.  It can also be
       used to switch from one user to another at any time  (most
       modern  shells  have  support  for this feature built into
       them, however).

       If an argument is not given, llooggiinn prompts for  the  user-
       name.

       If  the	user is _n_o_t root, and if _/_e_t_c_/_n_o_l_o_g_i_n exists, the
       contents of of this file are printed to	the  screen,  and
       the  login  is terminated.  This is typically used to pre-
       vent logins when the system is being taken down.

       If the user is root, then the login must be occuring on	a
       tty  listed  in	_/_e_t_c_/_s_e_c_u_r_e_t_t_y.	Failures will be logged
       with the ssyysslloogg facility.

       After these conditions are checked, the password	will  be
       requested  and  checks (if a password is required for this
       username).  Ten attempts are allowed  before  llooggiinn  dies,
       but after the first three, the response starts to get very
       slow.  Login failures are reported via the  ssyysslloogg  facil-
       ity.   This facility is also used to report any successful
       root logins.

       If the file _._h_u_s_h_l_o_g_i_n exists, then  a  "quiet"	login  is
       performed  (this	disables the checking of the checking of
       mail and the printing of the last login time  and  message
       of  the	day).  Otherwise, if _/_u_s_r_/_a_d_m_/_l_a_s_t_l_o_g exists, the
       last login time is  printed  (and  the  current	login  is
       recorded).

       Random  administrative things, such as setting the UID and
       GID of the tty are performed.  The TERM environment  vari-
       able  is	preserved, if it exists (other environment vari-
       ables are preserved if the --pp option is used).	Then  the
       HOME,  PATH,  SHELL,  TERM,  MAIL, and LOGNAME environment
       variables     are     set.      PATH	defaults      to
       _/_u_s_r_/_l_o_c_a_l_/_b_i_n_:_/_b_i_n_:_/_u_s_r_/_b_i_n_:_.	for  normal users, and to
       _/_b_i_n_:_/_u_s_r_/_b_i_n_:_/_e_t_c for root.   Last,  if	this  is  not	a
       "quiet"	login,	the message of the day is printed and the
       file with the  user's  name  in	_/_u_s_r_/_s_p_o_o_l_/_m_a_i_l	will  be
       checked,	and a message printed if it has non-zero length.




Linux 0.99		1 February 1993			1





LOGIN(1)	    Linux Programmer's Manual		LOGIN(1)


       The user's shell is then started.  If no shell  is  speci-
       fied  for  the  user in //eettcc//ppaasssswwdd, then //bbiinn//sshh is used.
       If there is no directory specified in _/_e_t_c_/_p_a_s_s_w_d, then	_/
       is  used (the home directory is checked for the _._h_u_s_h_l_o_g_i_n
       file described above).

OOPPTTIIOONNSS
       --pp     Used by ggeettttyy(8) to tell llooggiinn not to  destroy  the
	      environment

       --ff     Used  to	skip a second login authentication.  This
	      specifically does nnoott work for root, and	does  not
	      appear to work well under Linux.

       --hh     Used  by	other  servers (i.e., tteellnneettdd(8)) to pass
	      the name of the remote host to llooggiinn so that it may
	      be placed in utmp and wtmp.  Only the superuser may
	      use this option.

FFIILLEESS
       _/_e_t_c_/_u_t_m_p
       _/_e_t_c_/_w_t_m_p
       _/_u_s_r_/_s_p_o_o_l_/_m_a_i_l_/_*
       _/_e_t_c_/_m_o_t_d
       _/_e_t_c_/_p_a_s_s_w_d
       _/_e_t_c_/_n_o_l_o_g_i_n
       _._h_u_s_h_l_o_g_i_n

SSEEEE AALLSSOO
       iinniitt(8), ggeettttyy(8), mmaaiill(1),  ppaasssswwdd(1),	ppaasssswwdd(5),  eennvvii--
       rroonn(7), sshhuuttddoowwnn(8)

BBUUGGSS
       Linux,  unlike other draconian operating systems, does not
       check quotas.

       The undocumented BSD --rr option is not supported.	This may
       be required by some rrllooggiinndd(8) programs.

AAUUTTHHOORR
       Derived	from  BSD  login  5.40	(5/9/89)  by Michael Glad
       (glad@daimi.dk) for HP-UX
       Ported to Linux 0.12: Peter Orbaek (poe@daimi.aau.dk)














Linux 0.99		1 February 1993			2


