04-19-2007 10:44 AM
I currently sftp my alias and masquerading files from a MSAccess database and have top load them manually via a ssh session on my C30.
Is there as Perl script or similar that I can run from my PC that will log onto the C30 and execute command to automate this process?
Thanks
04-19-2007 02:49 PM
In a perl script you can automate the ssh and then run the remote Ironport command :-
aliasconfig import $fname; commit alias
Hope this helps. I can send you an example script if you like.
04-20-2007 09:53 PM
I can send you an example script if you like
04-24-2007 03:58 PM
For ssh:
echo "ironport command"|ssh -t ironportname
If you have several commands, you can create a file with the command that you want to run then do - you have to keep in mind any prompts that require a yes/no answer - before we had centralized management, we would use this method against are boxes to keep in sync. Centralized management is much nicer though:
cat filename|ssh -t ironportname
However, you will want to setup the userkeys first so you don't have to log on with username/pwd if you are running from a script such as bash.
Can you post the sample code to the forum? I'm interested in the method you use for automating the SSH commands to an Ironport device.
Thank you,
Steven
05-04-2007 07:54 AM
You could also use the 'expect' language to simulate a human at a keyboard.
Check out :
http://expect.nist.gov/
:)
05-07-2007 09:12 AM
I have tried to create a script that can use choices but i cant get it to work.
Here is an example:
userconfig new testuser testuser 1 secret
Where "1" is one of the groups (Administrators,Operators,Guests)
I always receive an error stating "unknown group name"
I have tried the group number as well as the group name.
Any help is appreciated.
05-08-2007 10:35 AM
Uwe,
The group for administrators is "admin" (the other two are: operators and guest) so the command should be:-
userconfig new testuser testuser admin secret;commit newuser
05-10-2007 12:44 PM
daryl,
thanks for your answer. It works as expected.
How did you find the right groupname?
Thanks
Uwe Sommer
05-15-2007 10:18 AM
Uwe,
If you run userconfig from the CLI the userlist that is displayed shows the groupname in brackets after the username.
e.g. 1. testuser - "testuser" (operators)
Cheers,
Daryl
05-15-2007 10:19 AM
Uwe,
If you run userconfig from the CLI the userlist that is displayed shows the groupname in brackets after the username.
e.g. 1. testuser - "testuser" (operators)
Cheers,
Daryl
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: