Howto enable "Password never expires"

G

Guest

I want the user I created to have a password that doesn't expire.
I read that this cannot be done though settings of CD orTD.

The article "How to update an XP Embedded user account to prevent the
password from expiring" on
http://blogs.msdn.com/astebner/archive/2004/09/07/226561.aspx seemed to solve
my problem.

I followed the instructions an created a security template in which I set
both minimum and maximum password age in "Account Policies - Password
Policy" to 0. I added an FBA generic command to my the "User
Account"-component to perform at phase 4500
filepath: %11%\secedit.exe
argument: /configure /db sctemp.sdb /cfg %11%/Ncp_admin.inf
The FBAlog.txt reports:
17:01:14 PM - [FBALaunch] C:\WINDOWS\system32\secedit.exe /configure /db
sctemp.sdb /cfg C:\WINDOWS\system32/Ncp_admin.inf (ExitCode: 0x0)
So you wwould think it worked, but if I open the user properties the
checkbox "Password never expires" still isn't checked.

So what am I doing wrong??

Thijs
 
M

ms

Thijs said:
I want the user I created to have a password that doesn't expire.
I read that this cannot be done though settings of CD orTD.

The article "How to update an XP Embedded user account to prevent the
password from expiring" on
http://blogs.msdn.com/astebner/archive/2004/09/07/226561.aspx seemed to solve
my problem.

I followed the instructions an created a security template in which I set
both minimum and maximum password age in "Account Policies - Password
Policy" to 0. I added an FBA generic command to my the "User
Account"-component to perform at phase 4500
filepath: %11%\secedit.exe
argument: /configure /db sctemp.sdb /cfg %11%/Ncp_admin.inf
The FBAlog.txt reports:
17:01:14 PM - [FBALaunch] C:\WINDOWS\system32\secedit.exe /configure /db
sctemp.sdb /cfg C:\WINDOWS\system32/Ncp_admin.inf (ExitCode: 0x0)
So you wwould think it worked, but if I open the user properties the
checkbox "Password never expires" still isn't checked.

So what am I doing wrong??

Thijs
you can use "net accounts" in a console window to verify if an account
will expire. this checkbox is only a ui feedback, i think.
 
M

Martin Grossen, eMVP [AVNET Silica]

Hi

Why don't you take my component
from www.xpefiles.com for this?
Have a look under Software.

To the problem: don't use %10% during FAB.
For TD it's ok, but not for the FBA deploy phase.
Work there with %SYSTEMROOT%.


--

Martin Grossen, eMVP

AVNET EMG Silica
Franchise Manager Microsoft Embedded Europe

Your competent partner for Microsoft Embedded licencing

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
G

Guest

Martin,

Thank you for the suggestion. But I still can't get it to work.

1. If the FBA deploy phase can't handle the %10% why does the FBALog.txt
report the expanded path correctly ??

2. I replaced the %10% with %systemroot% so the generic command is:
filepath: %SystemRoot%\Sytem32\secedit.exe
argument: /configure /db sctemp.sdb /cfg
%SystemRoot%\Inf\UnlimitedPassword.inf

The FBALog.txt reports:
22:51:55 PM - [FBALaunch] C:\WINDOWS\System32\secedit.exe /configure /db
sctemp.sdb /cfg 3hystemRoot\Inf\UnlimitedPassword.inf (ExitCode: 0x2)

After I use the UnlimitedPassword.inf, I try to remove the file using the
following generic command:
filepath: %SystemRoot%\Sytem32\cmd.exe
argument: /c "%SystemRoot%\Inf\UnlimitedPassword.inf"

This results in a simular error:
23:05:15 PM - [FBALaunch] C:\WINDOWS\System32\cmd.exe /c
"3hystemRoot\Inf\UnlimitedPassword.inf" (ExitCode: 0x0)

Any suggestions ??

By the way the results are the same for the "Rename network connection"
solution you suggested:

23:07:06 PM - [FBALaunch] C:\WINDOWS\System32\cmd.exe /c
"m}ystemRoot\RenameConnections.vbs" (ExitCode: 0x1)
23:07:06 PM - [FBALaunch] C:\WINDOWS\System32\cmd.exe /c "del
m}ystemRoot\RenameConnections.vbs" (ExitCode: 0x0)

Thijs
 
G

Guest

Update:

Just checked out the XPE help and it says the following under

FBA Generic Command - Arguments

Used to pass command-line arguments to a program run by FBA. Arguments
containing paths should use parameterized path names. For more information,
see Resource Editor Parameters and Windows Predefined Directories


The "Resource Editor Parameters and Windows Predefined Directories" links to
a page filled with the %11%, %12% stuff, so now I'm really confused.


Thijs
 
M

Martin Grossen, eMVP [AVNET Silica]

no, not the "rename network connection".
There is a component on www.xpefiles.com
under software named: "Set all user account password ages to unlimited"

With the path %10% I know, that the .log file is reporting the right path.
But writing this component, I had to change from %10% to %systemroot%....


--

Martin Grossen, eMVP

AVNET EMG Silica
Franchise Manager Microsoft Embedded Europe

Your competent partner for Microsoft Embedded licencing

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
G

Guest

%10% works.

It's just that I was expecting a checkmark in the user properties at
"Password never expires".
But that's not what "/configure /db sctemp.sdb /cfg
%10%\Inf\UnlimitedPassword.inf" does. It changes
the maximum password age of the entire system to unlimited, so the checkmark
just lets you choose
between unlimited and ...well yeah, unlimited. The maximum password age can
be checked with
the by typing "net accounts" on the command line.

BTW this is the content of the UnlimitedPassword.inf file

===================
[Unicode]
Unicode=yes
[System Access]
MinimumPasswordAge = 0
MaximumPasswordAge = -1
[Registry Values]
[Version]
signature="$CHICAGO$"
Revision=1
[Profile Description]
Description=Enable Password never expires
==========================

Thijs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top