If entering in the admin password each time doesn't work for you, you'll need to do some extra work, or run the script from a LanchAgent. That means the password has to be entered in each time the Applescript is run. If you look in that above thread, you'll see you will need to prefix your dscl commands with sudo though. Here is a related Q&A on a different forum that shows dscl embedded in an Applescript. Now that you know how to change the password using the command line, you need to embed that functionality into an AppleScript. Here's how to create a new user and here is how to change the password, which would be a command that looks like: The first thing you need to do is to use the dscl (Directory Service Command Line) tool. I can get you most of the way to the answer you need, but you'll have to do the actual implementation yourself.
0 Comments
Leave a Reply. |