mvslogin command examples

Use the mvslogin command to log in to z/OS from your workstation. The mvslogin command can be issued multiple times and the last one overrides the previous ones. The mvslogin command is only required when accessing data on systems where the z/OS NFS server site security attribute is set to saf or safexp.

Following are examples of the mvslogin command where mvshost is the name of the z/OS host, smith is the user’s ID on z/OS, and JSmith is the currently logged in Windows user. These examples assume that Windows user JSmith has been mapped to UID 502 and GID 1000 using one of the supported user name mapping methods. Information on how the current Windows user was mapped to a UNIX UID/GID is returned by message GFSA968I.

Figure 1. mvslogin requesting that the user be prompted for a password
c:\znfs-client-utils>mvslogin -p mvshost smith
GFSA968I UNIX uid=502/gid=1000 for user JSmith obtained from local passwd file.
GFSA973A Enter MVS password for SMITH: ********
GFSA955I SMITH logged in ok.
Figure 2. mvslogin specifying a password, group, and account
c:\znfs-client-utils>mvslogin -P smithspw -g finance -a 5278 mvshost smith
GFSA968I UNIX uid=502/gid=1000 for user JSmith obtained from Active Directory.
GFSA955I SMITH logged in ok.
Figure 3. mvslogin specifying a passphrase
c:\znfs-client-utils>mvslogin -P "Smith's password phrase" mvshost smith
GFSA968I UNIX uid=502/gid=1000 for user JSmith obtained from local passwd file.
GFSA955I SMITH logged in ok.

In Figure 3 double-quotation marks are required around the password phrase because of the apostrophe within the phrase. Otherwise, only single-quotation marks are required around the password phrase. See z/OS Security Server RACF Command Language Reference for more information on syntax rules for password phrases.

Figure 4. mvslogin requesting that the password be changed
c:\znfs-client-utils>mvslogin -n mvshost smith
GFSA968I UNIX uid=502/gid=1000 for user JSmith obtained from registry.
GFSA974A Enter new MVS password for SMITH: ********
GFSA975A Retype new MVS password: ********
Password required
GFSA973A Enter MVS password for SMITH: ********
GFSA955I SMITH logged in ok.
Figure 5. mvslogin requesting that the user be prompted for a password and that the password be changed
c:\znfs-client-utils>mvslogin -pn -a 5278 mvshost smith
GFSA968I UNIX uid=502/gid=1000 for user JSmith obtained from Active Directory.
GFSA973A Enter MVS password for SMITH: ********
GFSA974A Enter new MVS password for SMITH: ********
GFSA975A Retype new MVS password: ********
GFSA955I SMITH logged in ok.
Figure 6. mvslogin without specifying a z/OS UNIX user ID
c:\znfs-client-utils>mvslogin mvshost
GFSA968I UNIX uid=502/gid=1000 for user JSmith obtained from Active Directory.
Password required
GFSA973A Enter MVS password for JSMITH: ********
GFSA955I JSMITH logged in ok.

In Figure 6 no z/OS user ID is specified so mvslogin uses the current Windows user. Note that this requires that a JSMITH user be correctly defined to z/OS UNIX.

Figure 7. mvslogin without specifying a password
c:\znfs-client-utils>mvslogin mvshost smith
GFSA968I UNIX uid=502/gid=1000 for user JSmith obtained from Active Directory.
Password required
GFSA973A Enter MVS password for SMITH: ********
GFSA955I SMITH logged in ok.

In Figure 7 mvslogin attempts to authorize the user without a password. When that fails it prompts the user for a password.

Figure 8. Displaying the version of the mvslogin Windows executable
c:\znfs-client-utils>mvslogin --version
GFSA961I mvslogin (z/OS NFS utilities) 2.4, Mar 7 2019 10:54:23
Licensed Materials - Property of IBM
"Restricted Materials of IBM"
5650-ZOS
Copyright IBM Corp. 1991, 2019 All Rights Reserved.
US Government Users Restricted Rights - Use,
duplication or disclosure restricted by
GSA ADP Schedule Contract with IBM Corp.
Copyright Sun Microsystems, Inc &
Electronic Data Systems Corp. 1988, 1989
If user SMITH logs in successfully, the following message appears:
GFSA955I SMITH logged in ok.

Otherwise, an appropriate error message appears

Note: Messages with the prefix of GFSA, GFSC, and GFSN apply to NFS requests. These messages are further explained in Network File System messages.

When a z/OS UNIX UID or GID segment is defined with the user identification, an additional check is done to compare the z/OS UNIX UID or GID with the UID or GID mapped by Windows during the login processing. An informational message is returned when the server and the client UID or GID do not match. This informational message contains the z/OS UNIX UID and GID for the z/OS user identification:

GFSA978I SMITH logged in ok.   
         Mismatch in uid/gid: z/OS UNIX uid is 502, gid is 1000,
         client uid is 602, gid is 900.
Note: The authentication is considered successful even if the UID and GID do not match. The message is issued for the user's information only.

File not found message:

If you have successfully logged in and get the "File Not Found" message while trying to access data, that can be due to one of the following cases:

  • An mvslogout command for the same z/OS host has been entered from the same client platform. See the description of mvslogout in Using commands on Windows for details.
  • Your z/OS user ID has been automatically logged out because the logout attribute value has been exceeded. This can happen when you leave the client idle for too long. Enter the mvslogin command again, and start your processes again. To find out how many seconds you can stay logged in while your client is idle, issue the showattr command and look at the logout attribute.
  • In multi-homed environments where a system has more than one network interface, the remote IP address specified in the mount command should match the remote IP address specified in the mvslogin and mvslogout. Note that a loopback IP address and the real IP address for the same system are considered separate IP addresses and therefore require the mount command and mvslogin/mvslogout to have matching IP addresses.
  • The z/OS NFS server has been re-started. Enter the mvslogin command again, and start your processes again.

For more information, including additional causes of this message, see the explanation of the "File Not Found" message in Messages from the client platform (Windows).