If you can submit remote commands in with ssh or remsh/resh/rsh, then you you set up a double loop, a bit like this:-
Code:
for server in $server_list
do
ssh $server "for userid in $user_list
do
userdel $user_list
done"
done
This is entirely untested and just theoretical, but as a structure it might give you something to work with. You would be sensible to add error checking and some sort of response/logging so that you can verify the actions afterwards. If the command is different on different servers, you will have to handle that somehow.
Of course, the server that you choose to run this loop would need to be able to get through the firewall to each server listed, but I hope that this gives you something to work with. Have a go and let us know if you get stuck.
If you want to do a dummy run, then perhaps change the remote command to run to something like this:-
Code:
userdel ; for userid in $user_list
do
echo userdel $user_list
done
The extra userdel will ensure you can see the command in your path (and give the usage statement)
The echo will then show you what commands it would try to issue.
Hi all, working on script to create a user acct on all our servers.
for i in `cat $host_file`; do
ssh $i /usr/bin/sudo /usr/bin/mkuser id='bpadm' gecos='NetBackup Admin' 2>&1 >> $log
done
error i get is: 3004-692 Error changing "id" to "bpadm" : Value is invalid.
I have tried this in... (1 Reply)
Hi,
When most of the server applications get installed, they create their own user. I believe this is to not use the "root" account. For example, Apache when installed creates a user called "apache". And the directories which it uses are all owned by this user. This seems to be the... (2 Replies)
I'm getting ready to upgrade to Solaris 10 (from 8) and I'm trying to write a script that will delete approximately 800 user accounts that are no longer required. I'm trying to use the userdel -r command and read the input from a file with the list of user names. I've never been very good at... (3 Replies)
dear all,
i'm preparing a script which can do these actions :
1. stop remove server's certain service
2. clean the files on remote servers simultaneously (because lots of files need to be deleted)
3. after files/logs are removed, restart the service again
i'm stuck on how to clean remote... (4 Replies)
I wants to create 3 users and set password for the users in 400 servers. I can run this script without error. If wants to set the password in the same command it is not working. Like that i have to create 3 users
#!/usr/bin/ksh
for server in `cat /tmp/servers`
do
echo "servername =... (5 Replies)
Hi Y'all,
I need help adding 30 users to 50 servers.
Is there a way to automate this?
I'm using this command:
sudo mkuser pgrp=srvadm gecos=Spears, Brittney auditclasses=ALL sugroups=system,security user01
But I'm doing it per user, per server...HOW CAN I MAKE THIS EASIER?... (7 Replies)
Hi Experts,
I am new to scripting. We have around 400 Linux servers in our environment. I want to add a new user to a perticular group on all the servers using SSH.
Requirements:
1) Need to take the server names from a text file.
2) Login into each server and check whether perticular... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi This is my first post.I am learning Unix and finding it difficult to get a handle on the scripting side of... (5 Replies)
Hello All,
The servers in question are AIX/Unix servers. I was hoping to find a scripting solution where I could use one server as a jump server and run a script that would check each server for a user account (the source file for the user accounts would be a text file or csv file) , and delete... (4 Replies)
Hello,
I'm new to shell scripting and need a quick note on how to write a shell script to perform deletion of files from 5 different hostnames in various locations.
Found out to delete files from one path by using below command and made it to work on cron job but need to do it in a shell... (2 Replies)
Discussion started by: Teja G
2 Replies
LEARN ABOUT CENTOS
mail::spamassassin::plugin::pyzor
Mail::SpamAssassin::Plugin::Pyzor(3) User Contributed Perl Documentation Mail::SpamAssassin::Plugin::Pyzor(3)NAME
Mail::SpamAssassin::Plugin::Pyzor - perform Pyzor check of messages
SYNOPSIS
loadplugin Mail::SpamAssassin::Plugin::Pyzor
DESCRIPTION
Pyzor is a collaborative, networked system to detect and block spam using identifying digests of messages.
See http://pyzor.sourceforge.net/ for more information about Pyzor.
USER OPTIONS
use_pyzor (0|1) (default: 1)
Whether to use Pyzor, if it is available.
pyzor_max NUMBER (default: 5)
This option sets how often a message's body checksum must have been reported to the Pyzor server before SpamAssassin will consider the
Pyzor check as matched.
As most clients should not be auto-reporting these checksums, you should set this to a relatively low value, e.g. 5.
ADMINISTRATOR OPTIONS
pyzor_timeout n (default: 3.5)
How many seconds you wait for Pyzor to complete, before scanning continues without the Pyzor results.
You can configure Pyzor to have its own per-server timeout. Set this plugin's timeout with that in mind. This plugin's timeout is a
maximum ceiling. If Pyzor takes longer than this to complete its communication with all servers, no results are used by SpamAssassin.
Pyzor servers do not yet synchronize their servers, so it can be beneficial to check and report to more than one. See the pyzor-users
mailing list for alternate servers that are not published via 'pyzor discover'.
If you are using multiple Pyzor servers, a good rule of thumb would be to set the SpamAssassin plugin's timeout to be the same or just
a bit more than the per-server Pyzor timeout (e.g., 3.5 and 2 for two Pyzor servers). If more than one of your Pyzor servers is always
timing out, consider removing one of them.
pyzor_options options
Specify additional options to the pyzor(1) command. Please note that only characters in the range [0-9A-Za-z ,._/-] are allowed for
security reasons.
pyzor_path STRING
This option tells SpamAssassin specifically where to find the "pyzor" client instead of relying on SpamAssassin to find it in the
current PATH. Note that if taint mode is enabled in the Perl interpreter, you should use this, as the current PATH will have been
cleared.
perl v5.16.3 2011-06-06 Mail::SpamAssassin::Plugin::Pyzor(3)