Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How to enter the root password into terminal using apple scri pt



> From: 	Doug McNutt
> Sent: 	Monday, June 6, 2005 1:09 PM
> 
> At 00:00 +0530 6/6/05, selva.ganesan wrote:
> >Is there any way to supply password (for sudo) directly from the script?
> 
> I have been using a file in my home directory named ppas which is just the
> text of my password followed by a newline and nothing else. I set the
> privileges for the file to 600 as recommended for a similar file ".netrc"
> used by ftp clients.
> 
> Now I can:
> 
> sudo whatever < $HOME/ppas
> 
> which feeds sudo via standard input.  If sudo has been executed recently
> it will not ask for a password and will ignore the standard in.
> 
> The security stinks but it is perhaps better than having your password in
> a bunch of AppleScript files.
> 
You can increase the security by eliminating the grace period.

See this hint at macosxhints.com:
<http://www.macosxhints.com/article.php?story=20050519125822728&query=sudo>

Dennis
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.