[Casper] Enabling Root
Kerry Trampe
ktrampe at basd.k12.wi.us
Thu Jul 2 12:58:51 PDT 2009
Hey Jared, sounds like fun!
I'm pretty sure you can just set the password of root and it will
enable the root account.
So, if the admin user ran this script with the desired password as an
argument:
#!/usr/bin/expect -f
set rootpw [lindex $argv 0]
match_max 100000
spawn passwd root
expect "New password:"
send "$rootpw\r"
expect "Retype new password:"
send "$rootpw\r"
expect eof
It SHOULD enable root with the password specified.
Example, create a script containing the above code called
"enableroot.exp" and then run this:
./enableroot.exp ultramegasecret1334p0wneDpasswordgoeshere
Replace that ridiculous pw with yours, of course. :)
Let me know if you get stuck; good luck!
Kerry
P.S. I've attached the scrip to save you some time. :)
On Jul 2, 2009, at 1:11 PM, Nichols, Jared wrote:
> Hi-
>
> We’re looking at getting Random Password Manager working on OS X
> (already have it for our windows machines). RPM will spin the root
> account. Does anyone know how to script the enablement of the root
> account? Ideally, we’d enable it through Casper and then spin it
> with RPM.
>
> Thanks
>
> j
> ---
> Jared F. Nichols
> Desktop Engineer, Infrastructure and Operations
> Information Services Department
> MIT Lincoln Laboratory
> 244 Wood Street
> Lexington, Massachusetts 02420
> 781.981.5436
>
> _______________________________________________
> Casper mailing list
> Casper at list.jamfsoftware.com
> http://list.jamfsoftware.com/mailman/listinfo/casper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090702/ae4e234b/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enableroot.exp
Type: application/octet-stream
Size: 185 bytes
Desc: not available
Url : http://list.jamfsoftware.com/pipermail/casper/attachments/20090702/ae4e234b/attachment.obj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090702/ae4e234b/attachment-0001.htm
More information about the Casper
mailing list