Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Mon, 03 Nov 2003 21:34:04 -0500
From: Alan Dobkin <Cygwin@OmniComp.Org>
To: Cygwin Mailing List <Cygwin@cygwin.com>
Subject: RE: Take 2: Testers for new ssh-*-config scripts wanted!
Message-ID: <683451843.1067895244@[192.168.70.4]>
In-Reply-To: <F67AB1DD14544242BE5BFE94F5939175575F59@E2KMEMMCS1.ftbco.ftn.com>
References:  <F67AB1DD14544242BE5BFE94F5939175575F59@E2KMEMMCS1.ftbco.ftn.com
 >
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-OmniComp-MailScanner-Information: Protected by MailScanner at OmniComp.org
X-OmniComp-MailScanner: Found to be clean

I use Dave Roth's perl module for more complex user flag settings,
but the hands down easiest way to do this is with the NET command:

NET USER username /EXPIRES:NEVER

This command is built-in on all Windows NT/2K/XP systems.  For more
details see NET HELP USER.

Alan

--On Monday, November 03, 2003 4:05 PM -0600 "DePriest, Jason R." 
<jrdepriest@ftb.com> wrote:

>> Does anybody know how I can set "Password never expires"
>> from the command line?
>
> Corinna,
>
> User Accounts have a USER_FLAGS attribute that can be any combination of
> a couple of values.  One of these can be UF_DONT_EXPIRE_PASSWORD.  If it
> is present, the password never expires.
>
> I typically manipulate it using Dave Roth's Win32::AdminMisc perl module
> (UserGetMiscAttributes and UserSetMiscAttributes)... which is likely
> beyond the scope of what you want this script to do.
>
> The CREATEUSERS.VBS script from the Windows 2000 Resource Kit
> (Supplement 1) looks promising.  I haven't used it, but the code seems
> capable of specifying the UF_DONT_EXPIRE_PASSWORD option.
> I would attach the .vbs file (as a .txt file), but it is copyrighted by
> Microsoft.  If anyone knows if emailing it would be "bad" or not, let me
> know.
>
> -Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

