Jump to content

Create Task Schedule with user and passord


YonZ
 Share

Recommended Posts

I need to create a simple install script, who will copy 3 files to a local disk on XP Pro, Sp2.

And then create a Task Scheduler with the current user credentials (username and passord), as the Task has to run with the Users Domain account and his password.

I have no access to the password!

Is this possible?

and if possible, how?

Link to comment
Share on other sites

Creating the Task is easy, but get the users password is the tricky part of this!

You're not serious, are you?! :P

Even Admins are not supposed to have access to user's passwords. You can get the hash and try to crack it, but that doesn't put you in company with white-hat administrators, now does it? :D

If you don't have the cooperation of the user whose password you are trying to crack, then you shouldn't be able to initiate processes under their credentials. If you could, it would be a critical security flaw requiring an immediate patch from Microsoft to put a stop to you (err... I mean... put a stop to it...). :)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

:P .. I think he's trying to ENTER the password into the dialog that creates the scheduled item .. not crack it!

Quoting from the original post:

I have no access to the password!

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Well, I do not want to crack anything...

I just wanted to know if it was somehow possible to create a Scheduler Task who will run with the users Credentials with out knowing the users password... But I guess at that is not possible with out asking the users to type inn the password...

I wanted to script the installation of the scheduler so the users will not need to do anyting.

So I think at I have to create a new user with password i know, and use that user to run this task.. the problem is at this will be problem as I want to administer acess via groups is AD... but I can make a workaround as I can create a script who will remove the Scheduler if the logged on user is not member of the correct group...

:)

Link to comment
Share on other sites

Well, I do not want to crack anything...

I just wanted to know if it was somehow possible to create a Scheduler Task who will run with the users Credentials with out knowing the users password... But I guess at that is not possible with out asking the users to type inn the password...

I wanted to script the installation of the scheduler so the users will not need to do anyting.

So I think at I have to create a new user with password i know, and use that user to run this task.. the problem is at this will be problem as I want to administer acess via groups is AD... but I can make a workaround as I can create a script who will remove the Scheduler if the logged on user is not member of the correct group...

:)

you're using the scheduler to shedule an install of the scheduler?

what?

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Link to comment
Share on other sites

you're using the scheduler to shedule an install of the scheduler?

what?

No, no...

I have to run a robocopy script who will sync some directory from a fileserver to lokal pc, and that script has to be scheduled to run every x minutes when the use is logged on, with the users credentials pr that was the goal, but I think I have to create a user to run the scheduler with and then fix the access right... so I can remove the scheduler when the logged on user have lost access to this directory, as it include confidential info... I guess I can use AutoIT to read from AD? I have not testet, at least I can run som command lines stuff to check for access rights

Or... is there function to "RunAs" current user???? then I can schedule this as System... but change in the script to Run as current user... I don't know if that is possible...

Link to comment
Share on other sites

I think I understand what he is trying to do. When you use Task Scheduler, you need to put in a user and password, or Windows will kickout a error. I discovered this when trying to automate SpybotSD to run on automatic on a home PC. What I did as a workaround was create a service account, and gave it the rights it needed to run it. If it is a home PC, you can hide the account from showing up in the logon screen with a registry hack. If it is a pro workstation, you won't need to hide the account but the thing will still need to have the correct rights.

You could also use RunAsSet. It is in the helpfile

Link to comment
Share on other sites

No, no...

I have to run a robocopy script who will sync some directory from a fileserver to lokal pc, and that script has to be scheduled to run every x minutes when the use is logged on, with the users credentials pr that was the goal, but I think I have to create a user to run the scheduler with and then fix the access right... so I can remove the scheduler when the logged on user have lost access to this directory, as it include confidential info... I guess I can use AutoIT to read from AD? I have not testet, at least I can run som command lines stuff to check for access rights

Or... is there function to "RunAs" current user???? then I can schedule this as System... but change in the script to Run as current user... I don't know if that is possible...

If the user is logged in, why not just create an AutoIT script to do the ROBOCOPY and put it in their Startup folder? The script can be looping in the background silently do its thing, will only run while the user is on, with the user's permissions, and will quit when the user logs off.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

If the user is logged in, why not just create an AutoIT script to do the ROBOCOPY and put it in their Startup folder? The script can be looping in the background silently do its thing, will only run while the user is on, with the user's permissions, and will quit when the user logs off.

:)

Simple, I have to synchronize every 45 minutes or so, all day, so this special users will always have latest info local on their PC. thei are on and off the network all the time.. laptop users. That script is up and running very fine, written in autoit...

I have now created a user, but I need to put in a rutineto check if the user of the pc is allowed to run this script..

Link to comment
Share on other sites

Ok, you said you are using Active Directory. Do you have admin rights on the users computers? If you do you can use the dos command schtasks to schedule the tasks to run under your own account.

It would be easy to create a file of computer names you want the same task scheduled on an run a script to read the file to schedule it.

Link to comment
Share on other sites

Ok, you said you are using Active Directory. Do you have admin rights on the users computers? If you do you can use the dos command schtasks to schedule the tasks to run under your own account.

It would be easy to create a file of computer names you want the same task scheduled on an run a script to read the file to schedule it.

The problem is at this information I will copy is Strictly confidential, and we have to be able to lock out users who have lost access to this information at once their account is lock-ed or deleted in AD...

But as I wrote before, I have to create a domain users to run this, and then create a ruitne in the script to check the AD for access (Membership in a group), I think that is the only solution.

The reason I need a user to run this is that at I hve to create a Install Script and the users will not need to do anything, just be a member of specifc group and then he will get this installed, we have Installation system who do this in place.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...