Index of Section 1 Manual Pages
| Interix / SUA | loginenv.1 | Interix / SUA |
loginenv(1) loginenv(1)
loginenv
NAME
loginenv - create a new login shell with login environment
SYNOPSIS
loginenv [-p] [-l username] [-h hostname]
[-c cmd [cmd arg...]]
DESCRIPTION
The loginenv(1) utility creates a new login shell with the user's original
login environment and the user's login directory. It also logs an entry in
the utmp(5) file.
The loginenv(1) utility takes the following options and operands:
-p
Preserves the user's existing environment and current working
directory instead of providing the user's default login environment
and directory. If this option is not specified, the new environment is
created using system global values and user-specific values stored in
the Windows registry. In addition, if this option is not specified,
the following variables are set to the value from the user's
getpwent(2) structure. These environment variables will replace any
settings found in the global environment settings:
* HOME
* PATH (set to the Interix default value, which can viewed using
getconf CS_PATH)
* SHELL
* LOGNAME (if -l option is not specified)
* USER (if -l option is not specified)
-l username
Sets the LOGNAME environment variable to username instead of the user
name of the logged-on user.
-h hostname
Specifies the name of the host stored in the utmp(5) file.
-c cmd
Specifies the full path of a command to be executed instead of the
user's default login shell.
arg
Specifies an argument to be passed to cmd. Note that if arg is
present, cmd must be specified twice. For example, to list the /tmp
directory, use loginenv -c /bin/ls /bin/ls /tmp.
DIAGNOSTICS
The loginenv(1) utility returns 0 on success, or one of the following:
1
Not used.
2
An invalid command-line option was specified.
3
The login name could not be determined.
4
Not enough memory was available to store the user's environment.
5
The attempt to change the current working directory failed.
6
If -c is specified, exec(2) failed to execute cmd; otherwise, exec(2)
failed to execute the login shell.
SEE ALSO
login(1)
utmp(5)