# set-remote-user command

The set-remote-user BASIC program can
be used to allow the local user to utilize a different user and/or
password when connecting to a remote OSFI server which has been started
with the a option to force user/password authorization.

When the client process attempts to open a file on a remote
OSFI server which has been started with the a option,
the server refuses the request unless the passed user and password
match a user and password present on that server. By default, the
client passes its local user and password to the remote server. Provided
the same user and password combination is defined on that server,
then access is granted. However, it is often not realistic for user
names and/or passwords to be identical across different machines.
In this situation, set-remote-user allows the client
user to specify that an alternate user/password combination be used
when opening files on remote servers.

## Syntax

```
set-remote-user
set-remote-user ?
set-remote-user host
```

## Parameter(s)

| options | k | Kills the specified host entry. |
| --- | --- | --- |
| r | Reverifies password. If this option is used, then the password is requested twice to ensure its correctness. | |
| s | Saves authorization information in the users file. Note: Although this information is stored in an encrypted format, it could theoretically be decrypted by a determined individual. It is suggested that security-critical information be entered at every logon rather than have that information stored in the users file. | |
| v | Verbose output. This option displays the current user mappings. | |
The first and second forms display the current user mappings.

The third form allows the user to enter (or destroy if used with
the k option) a mapping entry for the specified remote
OSFI host. The program prompts for the remote user and password to
be used on all future connections to that host. The authorization
of this information is performed automatically when the first file
from that data source is opened. An authorization failure causes the
open to fail.

Note: The way the authorization information is used
depends on the remote server configuration. If the OSFI server is
not booted with the a security option (for Authorization), then the
passed local user permissions are applied directly to obtaining resources.
If the a security option is used, then the server first looks for
a user on that server called *ClientHostName*:*ClientMappedUser* where *ClientHostName* is the local host name defined on the
client and *ClientMappedUser* is the mapped user specified by
the client. If this user is not found (or the password is not correct),
then the server tries to locate the local user *ClientMappedUser*. When a local user match is found, the file permissions are derived
from that user definition on the server. The client permissions are
ignored in this case.

## Example(s)

If the local user name is joe,
this allows user mark access to open files on the `macha` server, with no password.

```
set-remote-user macha
Remote User : mark
Remote Password :
```

## See also

- [Logon](https://d3codex.com/definitions/logon/)
- [network-setup utility](https://d3codex.com/tcl/network-setup-utility/)
- [users file](https://d3codex.com/systemfiles/users-file/)

---
Source: https://d3codex.com/tcl/set-remote-user-command/ - part of the D3Codex reference.
