Re: Changing the info in the sudoers file
Re: Changing the info in the sudoers file
- Subject: Re: Changing the info in the sudoers file
- From: Philip Aker <email@hidden>
- Date: Wed, 16 Jul 2008 01:11:04 -0700
On 08-07-15, at 13:08, Tod Hallberg wrote: I am needing to add some users to the sudoers file. I can do it manually, but a script would be so much more efficient. I am going to run the script from an account that is already in the sudoers file, and has admin rights.
Assuming your write permissions are ok, here is one way to append text to a file:
set stamp to do shell script "date +'%F'" set cmnd to "echo \"\n\n# PMA: " & stamp & " Users from group Munchkins added\" >> /private/etc/sudoers" do shell script cmnd
Philip Aker
Democracy: Two wolves and a sheep voting on lunch.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden