Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
AUTOLOGIN(8L)							 AUTOLOGIN(8L)

NAME
       autologin - create an automatic login session from /etc/inittab

SYNOPSIS
       /usr/local/sbin/autologin  [  -Cu  ] [ -c command ] [ -e	env=val	] [ -g
       group ] [ -l login ] [ -t tty ]

DESCRIPTION
       Autologin creates a login session for login by running an `su -	login'
       on  the specified device	(tty).	If a command is	given, that command is
       executed	via `su	login -c command.'

       Autologin also changes the ownership of the tty port to	the  user  and
       sets the	mode to	0600.

       On AIX, autologin uses getuserattr(3) to	determine which	groups are re-
       quired to su to login and sets those groups for the process before exe-
       cuting the su(1)	command.

OPTIONS
       -C     Asserts  the  ioctl(2) to	redirect console output	to the tty de-
	      vice.  This can be used from conserver's virtual console	facil-
	      lity to emulate a	system console.

       -ccommand
	      Execute command rather than a login shell.

       -eenv=val
	      Add  the	evironment variable assignment env=val to the environ-
	      ment.

       -ggroup
	      Add group	to current process group  set  before  running	su(1).
	      This  option probably isn't necessary since the group set	should
	      be properly handled through the use of getuserattr(3).

       -llogin
	      Create the login process for the user login.  If none  is	 given
	      the effective uid	is used.

       -ttty  tty  is  the name	of the character-special file that corresponds
	      to the terminal to be logged in.	If none	is given  the  current
	      controlling terminal is used.

       -u     Don't  create  a	utmp  entry.  Normally,	an entry is written to
	      /etc/utmp	to maintain a record of	users logged into the system.

EXAMPLES
       Adding the following line to /etc/inittab on an AIX machine establishes
       a  root	login  on the console terminal (/dev/tty0) with	any error mes-
       sages directed to /dev/console:
	    cons2:2:respawn:/usr/local/sbin/autologin -t/dev/tty0 -lroot >
       /dev/console 2>&1

       Adding  the following line to /etc/inittab on an	AIX machine causes ss-
       info to be logged in on /dev/tty10 with the TERM	 environment  variable
       set to reg20:
	    ss10:2:respawn:/usr/local/sbin/autologin -e	TERM=reg20
       -t/dev/tty10 -lssinfo

       Adding the following line to /etc/ttytab	on a Sun 4.1.x machine	estab-
       lishes a	root login on the console device:
	    console "/usr/local/sbin/autologin -lroot -t"    xterm   on	local
       secure

       Note that init provides the tty argument	on the end of the command.

FILES
       /bin/su
       /etc/inittab
       /etc/passwd
       /etc/utmp

SEE ALSO
       su(1), getuserattr(3), inittab(5), init(8).

AUTHOR
       Jeff W. Stewart - Purdue	University Computing Center
       K. S. Braunsdorf	- Federal Express

BUGS
       Doesn't add entries to /usr/adm/wtmp??
       Doesn't add utmp	entry unless it's been setup by	init(8).
       Only runs on FREEBSD, SUN3, SUN4,  SUN5,	 EPIX,	IBMR2,	PARAGON,  HPUX
       (currently).
       Some  versions of init do not set the session ID, which will cause com-
       plaints about getpgrp and setpgrp and will not associate	/dev/tty  with
       your terminal.  A workaround is to use the -t option.

				     PUCC			 AUTOLOGIN(8L)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | FILES | SEE ALSO | AUTHOR | BUGS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=autologin&sektion=8&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help