# logon command

The logon command logs on a port, other than the one currently being
 used, onto a specific account.

## Syntax

```
logon {(p)}
line,user-ID,user-password,md,md-password:
```

## Parameter(s)

| p | Starts process as a phantom line. Note: This does not have the same meaning as what is often considered a phantom, where the process spawns a new process workspace. Rather, this option requires an existing unused port, just like any other port being used for a remote logon. In this context, phantom means that it is treated like a spooler process. This means that the logon sequence is suppressed, which turns off the display of the time and date logged on, the welcome message and the automatic update of the acc file. |
| --- | --- |

 Note: After three unsuccessful logon attempts, the port is rendered *inactive*, preventing
 further attempts. To *reactivate* the port, press any key (other than Enter), and then
 press ENTER twice. Passwords are case-sensitive.

 The process prompts with:

```
line,user-ID,user-password,md,md-password:
```

| line | Port number to log on. The port cannot already be logged on. |
| --- | --- |
| user-ID | User-ID (must be in dm,users,). |
| user-password | User password (if defined). |
| md | Account name to log on to. Note: This prompt can be edited or customized using either the Editor or Update processor and can be read from the master dictionary item, mdprompt. For example, if using the Update processor, type: ```
u only mds,, mdprompt
``` |
| md-password | Account password (if defined). Note: This prompt can be edited or customized using either the Editor or Update processor and can be read from the master dictionary item, mdpassword. For example, if using the Update processor, type: ```
u only mds,, mdpassword
``` |

 This command is also useful for invoking *background* tasks on another port. Background
 or *phantom* tasks can also be invoked using the phantom processor.

## Example(s)

Logs line 0 on to the user-ID dm with no user password, then on to the account dm, which also
 has no password.

```
logon
line,user-ID,user-password,md,md-password: 0,dm,,dm
```

## See also

- [charge-to command](https://d3codex.com/tcl/charge-to-command/)
- [charges command](https://d3codex.com/tcl/charges-command/)
- [end command (TCL commands)](https://d3codex.com/tcl/end-command-tcl-commands/)
- [Hung port](https://d3codex.com/definitions/hung-port/)
- [logoff command](https://d3codex.com/tcl/logoff-command/)
- [Logon](https://d3codex.com/definitions/logon/)
- [logon-reporting command](https://d3codex.com/tcl/logon-reporting-command/)
- [Logon procs and macros](https://d3codex.com/proc/logon-procs-and-macros/)
- [logto command](https://d3codex.com/tcl/logto-command/)
- [Background/Phantom process overview](https://d3codex.com/backgroundphantomprocess/background-phantom-process-overview/)
- [Port number](https://d3codex.com/definitions/port-number/)
- [u9116 user exit](https://d3codex.com/pickbasic-flashbasic/u9116-user-exit/)
- [z command (Background/Phantom process commands)](https://d3codex.com/backgroundphantomprocess/z-command-background-phantom-process-commands/)

---
Source: https://d3codex.com/tcl/logon-command/ - part of the D3Codex reference.
