From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,5ed1576afd890c50 X-Google-Thread: 106cd7,a66ecd4dd77c81b3 X-Google-Attributes: gidfa528,gid106cd7,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!border1.nntp.ash.giganews.com!nntp.giganews.com!priapus.visi.com!orange.octanews.net!news.octanews.net!phobos.visi.com!news-out.visi.com!lithium.visi.com.POSTED!not-for-mail Date: Mon, 03 May 2004 15:30:50 -0500 From: Mike Dorn User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.unix.tru64,fa.alpha-osf-managers Subject: Re: Get status of an user account in Tru64 References: <409626c6$0$24308$4d4ef98e@read.news.ch.uu.net> In-Reply-To: <409626c6$0$24308$4d4ef98e@read.news.ch.uu.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4096abfb$0$8694$a18e6209@newsreader.visi.com> Organization: VISI.com NNTP-Posting-Date: 03 May 2004 15:30:51 CDT NNTP-Posting-Host: 682a4c02.newsreader.visi.com X-Trace: DXC=4@31MibZbP>4JJnU9;hMV9Z;ogDGfS1c3cCV;7m>_`0;OkoloW5o\42Z?XJ\dl6d\9\CP8bBLID=1 X-Complaints-To: abuse@visi.com Xref: controlnews3.google.com comp.unix.tru64:27 fa.alpha-osf-managers:19 Soterro wrote: > Hello, > > I'm interested to know if there's a way to ask for the status of a > certain user account from within a script. The machine is not having the > trusted features enabled. My question is not related to a specific > version of Tru64, I would appreciate something that works since 4.0F or > such if possible of course. > > As far as I noticed, the administrative lock puts a 'Nologin' string in > front of the password entry in the passwd file, so this could be a > hands-on solution. However I don't know where to look whether the > account (and its password) is expired. > > Is there a command allowing to get the user's status or do I have to > parse myself some (which?) configuration files? dxaccounts doesnt say > anything about expiration, by the way (and wouldn't be a solution anyway > as I can't use it from a script). > > Thanks a lot, > S If you aren't using the C2 security features, then there is no such thing as password expiration. With base security, there are only 7 fields: username, password, userid, groupid, description, home directory and shell. Locking an account, as you've noticed, just sticks the word "Nologin" in front of the encrypted password. The more sophisticated security fields that are used to track password changed dates, expiration, etc., are only available when you use the C2 security, and they are stored in a separate database. (Exactly where depends on a couple of things, particularly whether or not you're using NIS.) If you do use C2, you can get at this data using a script (if you're su), but it takes a little parsing with awk to do it.