Difference between revisions of "Lat-hosts"

From SME Server
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
       file.
 
       file.
  
{{warning box| Your domain have to be defined as DNS resolved locally and not resolved by Internet DNS. If Internet DNS (default) is chosen then host will be defined in db but won't show on server-manager and won't be used}}
+
{{Note box| Your domain have to be defined as DNS resolved locally and not resolved by Internet DNS. If Internet DNS (default) is chosen then host will be defined in db but won't show on server-manager and won't be used}}
  
 
===Smecontribs repository for SME Server===
 
===Smecontribs repository for SME Server===
  
  yum install --enablerepo=smecontribs smeserver-lazy_admin_tools
+
  yum install --enablerepo=smecontribs smeserver-lazy_admin_tools smeserver-userpanel smeserver-mailsorting
 
  signal-event post-upgrade; signal-event reboot
 
  signal-event post-upgrade; signal-event reboot
  
Line 86: Line 86:
 
       Deletes all host names that start with 'ftp'. The host names will be
 
       Deletes all host names that start with 'ftp'. The host names will be
 
       deleted without prompting (-f).
 
       deleted without prompting (-f).
 +
=== Bugs ===
 +
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
 +
and select the e-smith-lazy_admin_tools component or use {{BugzillaFileBug|product=SME%20Contribs|component=e-smith-lazy_admin_tools|title=this link}}.
 
[[Category:Howto]] [[Category:Administration]]
 
[[Category:Howto]] [[Category:Administration]]

Latest revision as of 22:37, 26 June 2013

lat-hosts

The lazy administrator's tool to manage hostnames

DESCRIPTION

      Creates or deletes hosnames on Mitel's SME servers.  This tool is func-
      tionally equivalent to the 'Hostnames and addresses' option in the
      server-manager, but can be run from the command line or called from an
      other script.  It allows you, for example, to create a large number of
      hostnames in a batch process, or delete hostnames on a remote machine
      via an ssh console.
      See /usr/doc/lazy-admin-tools/example.hosts for the format of the input
      file.


Important.png Note:
Your domain have to be defined as DNS resolved locally and not resolved by Internet DNS. If Internet DNS (default) is chosen then host will be defined in db but won't show on server-manager and won't be used


Smecontribs repository for SME Server

yum install --enablerepo=smecontribs smeserver-lazy_admin_tools smeserver-userpanel smeserver-mailsorting
signal-event post-upgrade; signal-event reboot

SYNOPSIS

      lat-hosts -a -c "host| domain| loc. | visib. | loc.ip | glob.ip | mac"
      lat-hosts -a -i /path/to/hosts.list
      lat-hosts -d [-f] -c "Host | Domain"
      lat-hosts -d [-f] -i /path/to/hosts.list

OPTIONS

      The following options are supported:
      -a, --add
          Add a host name to the server
      -c ""Arguments"", --command-line=""Arguments""
          Take arguments from the command line. See below for the various
          arguments that are accepted.
      -d, --delete
          Delete a hostname from the server.  Wildcards (* and ?) are
          accepted.
      -f, --force
          Don't prompt before deleting.
      -h, --help
          Extended help for this tool
      -i FILE, --input-file=FILE
          Use the information from FILE to create or delete the hostname(s).
      Arguments:
         host*      : Must contain only letters, numbers, and hyphens,
                      and must start with a letter or number. Wildcards
                      (* and ?) can only be used to delete hostnames.
         domain     : Must be an existing (virtual) domain name. If
                      omitted, the primary site is assumed.
         loc.       : Location of the server:
                      'Local' (on the LAN)
                      'Remote' (on the Internet)
                      'Self' (alias for the SME server)
         visib.     : 'Local' (only visible on the LAN)
                      'Global' (visible on the entire Internet).
         loc.ip     : Internal IP number
         glob.ip    : Public IP number
         mac        : The ethernet address is optional and causes the
                      DHCP server to statically bind the local IP address
                      to the computer with this ethernet address.
         * mandatory field

EXAMPLES

lat-hosts -a -c "ntp | hogwarts.net | self | local"
      Creates host name 'ntp.hogwarts.net' on the SME server. The host name
      will be visible only on the LAN.
lat-hosts -a -i /root/hosts.list
      Creates the host names defined in /root/hosts.list. Refer to
      /usr/doc/lazy-admin-tools/example.hosts for an example of an input
      file.
lat-hosts -d -f -c "ftp*"
      Deletes all host names that start with 'ftp'. The host names will be
      deleted without prompting (-f).

Bugs

Please raise bugs under the SME-Contribs section in bugzilla and select the e-smith-lazy_admin_tools component or use this link .