Welcome to WinForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Bug in NET USER /times or is it me?

 
   Windows XP (Home) -> XP Security Admin RSS
Next:  internet script error  
Author Message
Patrick Philippot

External


Since: Jan 11, 2008
Posts: 2



(Msg. 1) Posted: Fri Jan 11, 2008 12:18 pm
Post subject: Bug in NET USER /times or is it me?
Archived from groups: microsoft>public>windowsxp>security_admin (more info?)

Hi,

Let's assume the following command

net user john /times:F,10am-12pm

or

net user john /times:F,10:00-24:00

The command "net user john" displays the correct settings. But if John tries
to connect between 10am and 12pm, the login is rejected. If I change the
settings as follows

net user john /times:F,10am-11pm

or

net user john /times:F,10:00-23:00

there's no problem.

Is this a known bug or did I miss some syntax subtlety? How do I set
midnight as the end of the time slot?

--
Patrick Philippot - Microsoft MVP
MainSoft Consulting Services
www.mainsoft.fr

 >> Stay informed about: Bug in NET USER /times or is it me? 
Back to top
Login to vote
Patrick Philippot

External


Since: Jan 13, 2008
Posts: 1



(Msg. 2) Posted: Sun Jan 13, 2008 11:52 am
Post subject: Re: Bug in NET USER /times or is it me? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

It seems it's an XP specific bug. We have made some progress analyzing this
bug with another fellow MVP (Gilles Laurent). Actually, there are two
problems.

If I use the am-pm notation and if the end time is midnight as in

net user john /times:S,10am-12pm

the command "net user john" will display the expected settings but the logon
hours data (retrieved with the NetUserGetInfo API) is obviously wrong (first
bug):

\> netusertimes -get -user john
0 6 12 18 24
| . . . . . | . . . . . | . . . . . | . . . . . |
D D D D D D D D D D D D D D D D D D D D D D D D D Sunday
L D D D D D D D D D D D D D D D D D D D D D D D D Monday
M D D D D D D D D D D D D D D D D D D D D D D D D Tuesday
M D D D D D D D D D D D D D D D D D D D D D D D D Wednesday
J D D D D D D D D D D D D D D D D D D D D D D D D Thursday
V D D D D D D D D D D D D D D D D D D D D D D D D Friday
S D D D D D D D D D D A A D D D D D D D D D D D D Saturday

A : Allowed D : Disallowed

netusertimes being a small program written by Gilles and using the
NetUserGetInfo API..

Now, if I enter the following command:

net user john /times:S,10:00-24:00 (which is actually the same command)

the command "net user john" will display wrong settings (second bug)
claiming that John is allowed to logon from Saturday (S is for
samedi-saturday in french) 10:00am to Sunday 12:am. However, the actual
settings retrieved with netusertimes are correct and the logon hours work as
expected:

\> netusertimes -get -user john
0 6 12 18 24
| . . . . . | . . . . . | . . . . . | . . . . . |
D D D D D D D D D D D D D D D D D D D D D D D D D Sunday
L D D D D D D D D D D D D D D D D D D D D D D D D Monday
M D D D D D D D D D D D D D D D D D D D D D D D D Tuesday
M D D D D D D D D D D D D D D D D D D D D D D D D Wednesday
J D D D D D D D D D D D D D D D D D D D D D D D D Thursday
V D D D D D D D D D D D D D D D D D D D D D D D D Friday
S D D D D D D D D D D A A A A A A A A A A A A A A Saturday

A : Allowed D : Disallowed

We observe the same behavior with the english version of XP.

Conclusion: if the end of a time slot is midnight, do not use the am-pm
notation. Using the hh:mm notation will cause net user <username> to display
wrong settings but the actual settings will be correct and work as expected.

Cheers.

--
Patrick Philippot - Microsoft MVP
MainSoft Consulting Services
www.mainsoft.fr

 >> Stay informed about: Bug in NET USER /times or is it me? 
Back to top
Login to vote
Patrick Philippot

External


Since: Jan 11, 2008
Posts: 2



(Msg. 3) Posted: Mon Jan 14, 2008 12:03 am
Post subject: Re: Bug in NET USER /times or is it me? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

> Conclusion: if the end of a time slot is midnight, do not use the am-pm
> notation. Using the hh:mm notation will cause net user <username> to display
> wrong settings but the actual settings will be correct and work as expected.

Well, actually, there's no bug. It's a problem with the confusing am-pm
notation that is not interpreted here as in the US. 12pm doesn't mean
midnight but noon while 12am means midnight. Here in France, we tend to
consider that 12am is noon and 12pm midnight. So both the settings and the
display of the settings when using net user <username> are actually correct
and the command works as expected. Just, the notation is misleading...

--
Patrick Philippot - Microsoft MVP
MainSoft Consulting Services
www.mainsoft.fr
 >> Stay informed about: Bug in NET USER /times or is it me? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
How meany times can i format? - i was woudering if i can have multiple formats for this version of Windows Xp Home. Is there a certin amounts of Formats that im aloud to do using the product Key

Can't get Local User GPOs to work for the User Group on XP.. - Alright, I reeeeaaaalllly needs some help on this one. For some reason me, and the top 3 IT guys that we have here, can only get the accounts in the Administrator's group to obey both the local computer GPOs and the local user GPOs. The accounts in..

net user - when I try install flash player I get message that I am not computer administrator. But I am. Then start-run-cmd....net user I see that my son is helpAssistant. How I can change that? In user accounts hi is limited user. Microsoft Windows XP [Version....

user can't log in - i am setting up a use account, but when i try to log in under the new user account (limited, not administrator) I get the following message: windows cannot log you on because your profile cannot be loaded. check that you are connected to your network....

change user name - I have bought a nearly new notebook from a friend. I have changed the administrator details to my name and deleted the old user. In system information, the details of the old user are still present, and some files that I save have her name on them. Is...
   Windows XP (Home) -> XP Security Admin All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
  Windows XP
 Windows Vista!
 Win 2000/NT/98/ME


[ Contact us | Terms of Service/Privacy Policy ]