Use Powershell to change password on login - powershell

At the moment I'm building a login Script on powershell basis.
This login script should be able to change the users Password on login and change it back to the original on logout.
Problem here being that I want to change a Password of a domain user, the same user as the one who is logged in obviously
Now I found some neat stuff like the old, net.exe. but it all says I don't have the rights to change the password in the Domain.
I really can't believe that this is something impossible cause the user himself can change the password too.
Otherwise I'd have to find out how to run a login script with a domain admin...
Edit:
ok I'll try to explain our setup we have a so called VMware View environment, in which every user can login once. now we have the problem that there are accounts with generally known passwords, and some people find it highly amusing to steal others sessions. I've thought about it and making a little script that changes and then resets the password would be a neat little solution. I hope I was of help^^
It would be really helpfull if I could get some thoughts on this
Thanks in advance

This link might help you.
Also, according to the link above, you need to be on the domain controller to use net to change password (or supply the "/domain" option).

Related

How to find a password that was purposely recorded in Event Logs with PowerShell?

I have a very specific question. I'm in the middle of an assignment for school and my team is stuck at a part where we need to recover a password from the Event Logs that was purposely placed in there. He said there should be logs that have the password included in them that were man-made but we have no idea where to look. We've looked through the 4688, 4723, 4724 event logs, as well as the rest of them even though they don't apply much to this situation, to see if maybe there is custom information that's placed that includes a password but we can't find anything. There are logs where we can see that users were made and changes were made to their accounts/passwords and then one user was disabled and deleted but is there a way to actually get more information from an event log using PowerShell? We've been using MyEventViewer for the event logs but are really lost at this point. Our teacher said that he was able to get the password by using PowerShell. Does anyone have any idea as to how we could go about getting the password for a user like that going through PowerShell? It's the Domain Admin accounts password that we're looking for and it's also the same password for a KeePass database file that we need to unlock and then perform a live response after. Even if anyone knew how you can input your password into an event log, that would also really help so we can backtrack to see about exporting it. Any information would be greatly appreciated, thanks!

Using One-Time-Password in moodle

I am using moodle 2.x for some testing courses.
I'd like to use one-time-password for moodle login.
That means when users login with certain password, then they can take exams in that session.
However if they close the window or login their account, they can't login again anymore. And if they want to continue to take another exam, the teacher or administrator will help them by provide another password or something like that help them to login again.
Thanks all,
Noat
Either you will have to write a new auth plugin or you can use
prelogout_hook()
https://docs.moodle.org/dev/Authentication_plugins#pre_loginpage_hook.28.29
to suspend the use account

Password/Authentication for users inside App on iOS

my goal is to give my customers an option to lock their App's Data, so when they give their iPad/iPhone to someone else for an extended period of time, users can't access or accidentally look at confidential data.
[Some Background: It's a medical Application where physicians/staff-members would give iPads to patients. Now the patients are supposed to access some contents, yet shouldn't be able to look at other patients data]
So far, I have a password inside my App. But when a staff-member forgets and wants to reset it, the only thing I can do is "deletion of the whole database". I have a Disclaimer telling people to store their password somewhere, but this is still not the optimal user experience.
Is there anyway I could authenticate the user via his Apple-Password? This way only the person knowing the Devices-Account password can access the data and can always reset the Apple-Password with Apple.
PS: Server-Solutions, like having a User-Password pair with reset-via-mail on a server of mine is out of the question, since it would add to much complexity for the users and in many medical situations the Device shouldn't have access to the web.
Multiple thoughts:
I am not aware of any native public API to authentication using Apple password.
If your app is enterprise app, possibly you can use native private API. I would recommend to disassemble AppStore and check how does it do authentication then
You can also to try to access to some Apple web page which requires authentication and pass to it apple account and password and see what it will return. If it authenticated correctly, then you are fine and you can reset a password.
To make it secure, you will need to ask a user to enter it for a first time, so you can encrypt your encryption keys using authentication material (so you can decrypt encryption key later on).
However, I am not very big fan of this solution, since you can change Apple password and you will be stuck in such case.
Server solution is the best option and it's not that complex. Another option is Forgot password. You ask something what administrator know ("What is your first pet?") and he enters the answer when your application is configured and this answer could be used later to unlock your app.
P.S. And the best solution at the end (which is absolutely shameless self advertisement). A startup which I am part of (SpydrSafe) works on the product which solves exactly your problem. In fact, healthcare is one of the verticals which whom we actively works. If you are interested, contact me (my email is in profile)
if you authenticate the user via apple password, and they forget their apple password, then in order for them to retrieve that password is by reset-via-email .... so either way you are stuck with that dilemma.
As for actually using your apple password, no.
Best way to get what you want is to have the password stored somewhere in real life. Like another computer that the doctors can report to and ask for passwords or just don't forget the password.

What's the proper way of obtaining an account on CPAN?

Can you please tell me the steps I need to follow in order to obtain an account on CPAN? I'd like to contribute some modules.
A while back, I tried to create an account, and I remember I got back a mail containing some of this text:
The following links are only valid for PAUSE maintainers: and there were 2 links :
Registration form with editing capabilities:
and
Immediate (one click) registration:
I remember I clicked on the Immediate registration but it asked me for a username & password.I did not knew how to go on from there. Was I going in the wrong direction? Does anyone have a step by step account registration tutorial?
It's been so long since I created my CPAN account that I almost forgot. But you need to go to http://pause.perl.org/ and click "Request a PAUSE Account". PAUSE is the upload backend for CPAN, and from there you can register your account, create a new module, etc.
Follow the steps from the CPAN FAQ PAUSE FAQ. You need to supply a user name and a password to create an account.
When I registered a couple years ago, the first email I got was a simple acknowledgement that I requested an account. The second email was to welcome me as a new user; it notified me of an auto-generated password, and requested me to change my password.
It looks like you might be able to track your progress from this website: PAUSE.
Search for your user name.
I also ran a SuperSearch on PerlMonks to see if others have had problems with PAUSE. This is what turned up:
PAUSE ID
Is PAUSE working?
The perldoc for perlnewmod is a good starting point, and includes all the instructions you will need to setup your module properly for CPAN.
Send email to modules#perl.org for assistance. Browse the archives for your PAUSE id application.

How do I create a login system for an iPhone application

I'm trying to make a login system for my cocoa app. How would I do this? I know it involves SQL, but I know nothing of SQL. I want the user to register or login. It would be easier if apple had a source code for this kind of thing, but I don't think they do.
Best Regards,
Kevin
Implement the login system on the server. Then all you have to worry about in your app is:
send them to your website via URL to
sign up
query for a name and password
if name and/or password is incorrect more than three times, go to 1
user is logged in. Do something.
You can also use the keychain on the iPhone to securely store and retrieve passwords. Here's excellent code from Sci-Fi Hi-Fi. You prompt for a password, store it securely in the keychain for later comparison. Pretty simple. Documentation on the site.