G'day mdiesel
Can I suggest you add a "checkUserCredentials" function to your UDF to check "userid/password".
Check out this tread http://www.autoitscript.com/forum/index.php?showtopic=92240 for all the details.
I've been using it in one of my scripts for a while now and it works very well. Except it can't validate a user with no password.
Anyone know how to check that a user has a password or not? Would be a usefull addition to the "checkUserCredentials" to get around problem (ie no password).
Thanks
John Morrison
I overcome all this in my
Shutdown Options program, by storing user passwords and admin password for the program (encrypted in the settings ini). Obviously each user has to provide their own password, and other users cannot login to them unless they don't have a password set.
So essentially, if all users have a password set for logging in, then a user can only auto login/reboot into themselves ... as it should be, or why else have a password each. However, I have a hidden switch, that allows one to bypass that limitation ... dependent on user level (i.e. not an admin ... though as I'm the only admin on my systems, and all others are just power users, this limit has not been confirmed by me). Obviously the secret switch has access to the admin password (which needs to be set) ... and on my main system, all users are aware of the switch and are happy about it and use it (especially when we are on the net) ... us being all family ... and big on trust.
As a security measure, the hidden switch feature is not real good ... especially if any of the users don't have a password ... so it's just a convenience thing really ... not recommended in a corporate environment. It must be remembered of course, that an admin can always browse any non-admin user folder anyway.
If you are wondering about the requirement for the admin password (hidden switch aside), it needs to be set, so that the program has permission to change some registry keys ... otherwise it doesn't work properly (i.e. restore to normal after each login/reboot).
Also, hidden switch aside, an admin can always use my program to reboot into any other non-admin user ... they are not limited, except that for some reason that I've never really understood, it has to be reboot and not login ... otherwise you always get a login prompt ... Windows bug maybe ... who knows? Maybe a reboot is needed to clear some admin settings or permissions ... though using the secret switch you can do the reverse - any user can login (or reboot) straight into the admin ... so go figure ... though I guess, the secret switch means you are pretending to be admin logging into real admin!
By the way, on my system, admin never connects to the web, so neither I or my wife use passworded accounts for our general day to day use (though admin is passworded of course). Some of the kids have passwords, but we all know them anyway. So auto-logging into another user, is a no-boner for us anyway!
As a side note, I've always found it rather bizarre, that Microsoft itself recommends never using an admin account while surfing the net, and yet you cannot install or update many things unless you do. I get around that by using both my
Admin Rights and
Admin File Management programs ... especially for programs I get off magazine discs, that need to be registered from within the program itself during install (which itself needs admin permission).
Edited by TheSaint, 09 May 2009 - 05:34 PM.