I'm writing this script to remove users from a file, the sudoers file, to be
more specific.

Here is what I have so far, not sure where to go from here.

*#!/usr/bin/perl -w

# this script removes a user from sudoers file

my $sites = $ARGV[0];
my $user = $ARGV[1];

for my $site ($#ARGV[1]){
  open FILE, "$_/local/etc/sudoers" or die "cannot open sudoers for $sites:
$!";

print "Enter username you wish to remove from $sites sudoers.\n";

  while (<FILE>) {s/$_//}
  close FILE;
}*


-- 
"It's not what people call you, it's what you answer to."

Reply via email to