Operating System - OpenVMS
1753514 Members
5151 Online
108795 Solutions
New Discussion юеВ

Re: Disable OPEN VMS User Account Automatically

 
Jon Pinkley
Honored Contributor

Re: Disable OPEN VMS User Account Automatically

Others have noted the futility of "restricting" a fully privileged user. You should consider using the JUMP package, which gives you the ability to log what is being done by the privileged account. If you are interested in JUMP, see my replay dated Jan 16, 2008 08:11:51 GMT in http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1193355 The method I will demonstrate later is compatible with using JUMP too.

RE: "have requirement to disable the privilege user account (ABCUSER) after every successful login.
...After performing the task, once he logout. The user account will automatically disable after 1 or 2 hrs."

So which do you want? Disable after login or 1 or 2 hours after logout? We can do the first with standard built-in capabilities, but their isn't any automatic way to disable an account after some period of inactivity.

You asked for a onetime non-renewable password. Hoff gave a method of forcing a change with each use via UAF> modify /pwdlifetime="0 00:00:01", but that doesn't prevent reuse by the use that had access. He also has a section about some other flags for single login, but didn't explicitly talk about pre-expiring the password, and for a single login case, that is a key component.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1164674 is another thread that discusses the difference between

UAF> modify /flag=PWD_EXPIRED

and

UAF> modify /pwdexpired

The following shows one other way to get a "single login" without having to modify any login.com. Because it does not rely on something being done in the user's login.com, it also avoids the problem of non-restricted accounts having the ability to bypass the login.com. This example also assumes that external authentication is not enabled. If you are running a version VMS that supports external authentication, you may want to add noextauth,dispwdsynch to the flags

Also, if you are "arming the account" for a specific event, you may want to explicitly put a timeout with the /expiration= with time that the login must be done before.

One downside of any of the methods that disable the account "on the way in" is that they will prevent multiple logins to the account while it is being used. In fact, the method proposed here will stop all new logins once the login has happened; that includes batch jobs. The point being, it does what you ask for in the first paragraph.

Here's a demonstration of the method.

$ mc authorize mod pinkley/flag=(disforce,lockpwd)/pwde /pass=demoonetimepassword ! enable for 1 login, you may want to specify /expir=
%UAF-I-MDFYMSG, user record(s) updated
$ telnet 0
%TELNET-I-TRYING, Trying ... 127.0.0.1
%TELNET-I-SESSION, Session 01, host localhost, port 23
-TELNET-I-ESCAPE, Escape character is ^]

Username: pinkley
Password:
Welcome to OpenVMS (TM) Alpha Operating System, Version V7.3-2 on node SIGMA
Last interactive login on Monday, 18-FEB-2008 16:35:46.30
Last non-interactive login on Monday, 14-JAN-2008 19:30:25.23
WARNING - Primary password has expired; update immediately with SET PASSWORD!
Current login process name is PINKLEY_1 on terminal SIGMA::VTA283:

$ set pass
%SET-F-PWDLOCKED, password is locked to prevent change
$ log
PINKLEY logged out at 18-FEB-2008 16:38:09.96
%TELNET-S-REMCLOSED, Remote connection closed
-TELNET-I-SESSION, Session 01, host localhost, port 23
$ telnet 0
%TELNET-I-TRYING, Trying ... 127.0.0.1
%TELNET-I-SESSION, Session 01, host localhost, port 23
-TELNET-I-ESCAPE, Escape character is ^]

Username: pinkley
Password:
Your password has expired; contact your system manager
%TELNET-S-REMCLOSED, Remote connection closed
-TELNET-I-SESSION, Session 01, host localhost, port 23
$
it depends
Wim Van den Wyngaert
Honored Contributor

Re: Disable OPEN VMS User Account Automatically

Whatever you do, it will never be 100% secure.

Just tried a rsh to a captive account : it works (rlogin doesn't). You have to close that hole too.

The user can create prived batch jobs that run for ever and execute procedures on behalf of the user.

Etc

Wim

Wim
labadie_1
Honored Contributor

Re: Disable OPEN VMS User Account Automatically

if you want to know what ABCUSER has done while logged, try Peek and Spy
http://www.networkingdynamics.com/Peek.htm
or the freeware logger, or modify the ABCUSER account to begin with
set h 0/log
USER
PASSWORD

so (in theory), all the session will be logged in sethost.log

Good luck.
Kumar_Sanjay
Regular Advisor

Re: Disable OPEN VMS User Account Automatically

thanks