 |
 |
Perl script to change password
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Does anyone have a perl script that can be used via a web interface to change the password of a user account in Mac OS X?
I want to allow users to remotely be able to change their password (enter current password, then new password).
I'm using the system as a fileserver, hence nobody uses it directly. So remote management is needed.
|
I always use protection when fscking my Mac... Do you?
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2002
Status:
Offline
|
|
Is login via SSH not an option?
terje
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Originally posted by ttjervaag:
Is login via SSH not an option?
terje
I plan to disable shell access. Just file access.
So I was hoping I can use a perl script via a web interface to allow users to change their password.
|
I always use protection when fscking my Mac... Do you?
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
|
|
I always use protection when fscking my Mac... Do you?
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2002
Status:
Offline
|
|
...
Have you tried Webmin, which you can install from Fink? I think you could probably set detailed enough permissions there so that the only thing a user would be allowed to do would be to change his/her password. Of course, since webmin is open source you might learn how to do it from just looking at the code.
Just throwing out ideas, hope it might help.
terje.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Originally posted by ttjervaag:
...
Have you tried Webmin, which you can install from Fink? I think you could probably set detailed enough permissions there so that the only thing a user would be allowed to do would be to change his/her password. Of course, since webmin is open source you might learn how to do it from just looking at the code.
Just throwing out ideas, hope it might help.
terje.
Interesting idea.
I'm suprised nobody has created any code to setup/modify accounts via a perl script. I've looked around and nothing.
|
I always use protection when fscking my Mac... Do you?
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Apr 2000
Location: Durham, NC
Status:
Offline
|
|
Since user management is handled by netinfo, you would probably be able to put a shell script together to call niutil or nicl, and call it as a cgi, to accomplish what you want.
That said, allowing people to change passwords in this manner over the web is really not a stellar idea.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Originally posted by kcm3:
Since user management is handled by netinfo, you would probably be able to put a shell script together to call niutil or nicl, and call it as a cgi, to accomplish what you want.
That said, allowing people to change passwords in this manner over the web is really not a stellar idea.
I'm using my mac as a home fileserver... behind a firewall.
|
I always use protection when fscking my Mac... Do you?
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2001
Status:
Offline
|
|
Originally posted by macvillage.net:
I'm using my mac as a home fileserver... behind a firewall.
An AppleShare file server? If so, just click "Options..." and then click "Change Password..."
|
|
"Think Different. Like The Rest Of Us."
iBook G4/1.2GHz | 1.25GB | 60GB | Mac OS X 10.4.2
Athlon XP 2500+/1.83GHz | 1GB PC3200 | 120GB | Windows XP
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Apr 2000
Location: Durham, NC
Status:
Offline
|
|
I'm using my mac as a home fileserver... behind a firewall.
OK, so your server is behind a firewall. That doesn't make password changes coming from remote web users any more secure. You will need 2 things to make something like that more secure. 1) SSL. Unless you encrpyt the web traffic, the password changes can be seen easily on the wire. 2) more importantly, make sure your script is bulletproof. Since you will be effectively executing commands in the shell, you'll want to make sure that users can't make the script to anything unintended (either on purpose or by accident.)
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|