<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Diego,<br>
<br>
Many companies don't allow root user for the SSH. So usually its login
as normal user then either "su -" or "sudo su -". I think this script
can be more useful if it considers non root logins.<br>
<br>
My 2 cents.<br>
<br>
Thanks,<br>
Sam<br>
<blockquote cite="mid:200907071550.28555.diego.ercolani@ssis.sm"
type="cite">
<pre wrap="">Hello to all,
I finished modules for the archive of linux configuration.
It's a development version so please dear developer support it in the main
trunk
I wrote 2 modules:
llogin
lrancid
---------- LLOGIN --------------------
llogin is based on clogin 2.3.2 script, try to login via ssh and telnet. It
should login as root.
I did many modification to the clogin script, and I suppose a better check and
better diagnostic look.
The point of view I started from is that linux normally stores configurations
as files in the filesystem, every distribution use its own directory structure
and often, an entire backup of /etc directory is too redundant so I added a
new configuration parameter in the .cloginrc and a new "MetaCommand" that is
BackupFiles that is runned by llogin script using .cloginrc files to feed it.
The new parameter in the .cloginrc is "backupfile", so you need to add for
your linux machines at least a line in the .cloginrc file in the clogin
syntax:
add backupfile <glob host identifier> <path/filename> [path/filename] ...
if you want you can of course add new files in a new line; this is the reason
why I modified the clogin "add" procedure to feed correctly the
int_backupfiles global variable the llogin script is using.
I wrote a new procedure that is send_debug that, when called with a string as
parameter, prints a gren "Debug:" followed by the string, if debug is on.
(this of course is to increment visibility of check strings along the expect
debug stream.
--------- LRANCID ---------
lrancid is a modified version of rancid 2.3.2 that calls llogin with the
BackupFiles metacommand as command argument.
It have some hack to optimize the output of the llogin script, but is more or
less very similar to the rancid script
----------- rancid-fe -----------------
I of course modified the rancid-fe script to manage a new device category that
is "linux".
I'm attaching it to complete the contribution.
----------- sample .cloginrc ----------------------
here is my cloginrc file part that is regarded to the linux machine:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">CUT >>>>>>>>>>>>>>
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->add method linux.machine.domain ssh rlogin
add user linux.machine.domain root
add password linux.machine.domain thepassword thepassword
add autoenable linux.machine.domain 1
add backupfile linux.machine.domain /etc/issue
add backupfile linux.machine.domain /etc/network/interfaces
#add backupfile linux.machine.domain /etc/network/interfaces
<<<<<<<<<<<<<< CUT <<<<<<<<<<<<<<<<
Hope this would help many of you
Diego Ercolani
</pre>
<pre wrap=""><pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Rancid-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a>
<a class="moz-txt-link-freetext" href="http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss">http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss</a></pre></pre>
</blockquote>
<br>
</body>
</html>