• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing the info in the sudoers file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
echo email@hidden@nl | tr a-z@. p-za-o.@

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

References: 
 >Changing the info in the sudoers file (From: Tod Hallberg <email@hidden>)

  • Prev by Date: Re: Authentication scripting
  • Next by Date: RE: Open Windows
  • Previous by thread: Changing the info in the sudoers file
  • Next by thread: Re: Changing the info in the sudoers file
  • Index(es):
    • Date
    • Thread