Logging a user into a serverΒΆ

login_server()

Log a user into a server


SYNTAX

login_server(server, user_name, password)

Logs the user into the server specified.

server

A text string naming the server, optionally ending with a colon.

user_name

The name stored in the user file (UserName field).

password

A text string, supplied in unencrypted form.

The possible return values are:

0

Login successful

-1

Server not reachable

-2

User not found or password incorrect

Definitions for these return values can be found in $SCULPTOR/include/security.h.


EXAMPLE

if (login_server("Myserver:", "gabriel", "talisman") != 0){
     error "Login attempt failed"
}

RELATED TOPICS

Servers

Server security features

Server security database

Server security functions