0

We want to give access to some Windows Server users so they can remotely have access to our server and download from a special folder of the server.

The licenses we give to users, are time base. There should be 1 month, 2 month, ..., 1 year, ... licenses.

CURRENT SITUATION (WHAT I DON'T WANT):

When users are created and added to the OS, a solid expiration date is given.


WHAT I WANT:

Users' expiration date should be calculated automatically after first login. The user might not need his account right when purchases the license.

In other words:

When a license of the user we create is purchased at Jan 1st, he should use the license until Feb 1st. No matter whether he really logs in or not. He cannot come Feb 5th and begin using his license because that has expired then.

What I want is that when he comes at Feb 5th and begins using, the license update until March 5th.


CLARIFICATION (Update after MDMarra's comment)

  • Working environment is Windows Server 2012.
  • By the word 'user', I mean Native Windows Server Users. Whenever a new person purchases a license with me, I create them manually using net user command like this:

    net user ali pass /add /expires:2013-12-25
    
6
  • This doesn't sound like it complies with Microsoft licensing....
    – Dan
    Oct 20, 2013 at 9:52
  • Sorry @Dan, my question was really ambigoulus! I didn't mean 'Windows License' at all. Updated the question completely.
    – smhnaji
    Oct 20, 2013 at 17:49
  • 1
    @smhnaji Are you talking about locally created users that are logging on interactively? Or are you talking about Active Directory users, or even something else like IIS Manager users?
    – MDMarra
    Oct 20, 2013 at 18:15
  • @MDMarra Thank you for your attention, I updated the question.
    – smhnaji
    Oct 20, 2013 at 19:26
  • Why not change your model? If I purchase a one year SSL certificate on January 1st it will expire on December 31st, whether I use it beginning on January 1st or June 1st.
    – joeqwerty
    Oct 22, 2013 at 4:03

1 Answer 1

1

"net user" can be used to modify existing users - your problem is capturing when someone first logs in (can't use a login script because you don;t want it to run in users environment)

Easy enough if you don't mind doing it batch - just schedule a job to run overnight with a script to detect who has logged in that day (the details of that depend on the environment they are logging in to which you haven;t told us), and set the expiry date for any new ones (which is just a net user command if you don't have AD)

(It all gets much easier if you have Active Directory)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .