I work for a non-profit and recently had to take on some sysadmin responsibilities, and and it is a new area for me.
We have a Apple X Server that is running Darwin, and from time to time, especially on reboots, the timer on it gets out of sync which causes the machine to be unaccessible via share. I would like to write a little script that i can run that logs-in, updates the time, and logs out.
The main reason I would like to do it this way, is so that I can share that script user/pw with other non-technical folk. Currently, I login as root "Administrator" and type the following, "date MMddHHmmYY" (substituting the values MMddHHmmYY with the current date/time) and the problem resolves the issue.
I have read that only the root can change the date on the box, is it possible to create a user who logs in as root, changes time, logs out, without giving the root user info away?
I have not written a script before, and don't really know where to start. If you can point me in the right places, I would be very grateful.