Centos6.5 on ansible to Windows control

Source: Internet
Author: User
Tags ansible windows ntfs permissions

  1. Install dependent packages
    1. Installing pycrypto:http://blog.csdn.net/eric_sunah/article/details/45826933
    2. Installing Paramiko (http://blog.csdn.net/zyz511919766/article/details/18355795)
  2. Configure PowerShell

    1.   using $ The psversiontable.psversion command queries the PowerShell version, if less than 3.0 requires an upgrade of
        1. Execute PO as Administrator Wershell
        2. change execution Police:  set-executionpolicy RemoteSigned

        3. Upgrade PowerShell to 3.0, execute script: https://github.com/cchurch/ansible/blob/devel/examples/scripts/ Upgrade_to_ps3.ps1
        4. restart
        5. Verify that the upgrade was successful


    3. Detecting WinRM status

    4. Execute the following command to detect whether the Ansible controls Win7:
      Ansible windows-i hosts-m WIN_PING-VVVV
      Ansible windows-i hosts-m Setup
    5. Problems
      1. Ansible 401 Unauthorized. Basic Auth failed
        Symptom: HTTP Error 401.1-Unauthorized: Access is denied due to invalid credentials. 
        The user will not be able to access the computer because it is disabled by the user's anonymous access account (the default is the IUSR_ machine name) or if it has no access. 
        (1) To see if the anonymous account for site security settings in IIS Manager is disabled, if so, try to enable it in the following ways: 
        Local Users and groups, Computer Management, management tools, control Panel, enable the IUSR_ machine name account. If it is not resolved, proceed to the next step. 
        (2) To view the local security policy, the default anonymous access account for the site in IIS Manager or the group to which it belongs has permission to access the server through the network, if you do not attempt to grant permissions by using the following steps: 
        User rights assignment, local policies, security policies, local security policy, administrative Tools, start, and more, double-click Access this computer from the network to add the IIS default user or the group to which they belong. 
        Note: General custom IIS default anonymous access accounts belong to groups, and for security, there is no special need to follow this rule. 
        2, error number 401.2 
        Symptom: HTTP Error 401.2-Unauthorized: Access is denied due to server configuration. 
        Cause: Anonymous authentication is turned off 
        Run inetmgr, open Site properties, directory security, authentication and access control, check "Enable anonymous access", enter a user name, or click "Browse" to select a legitimate user and enter the password two times to confirm. 
        3, error number: 401.3 
        Symptom: HTTP Error 401.3-Unauthorized: Access is denied because the ACL is set on the requested resource. 
        Cause: IIS anonymous users generally belong to the Guests group, and we generally assign the permissions of the hard disk hosting the site only to the Administrators group, this time according to the principle of inheritance, the site folder is only members of the Administrators group to access, The NTFS permissions that cause IIS anonymous users to access the file are insufficient to cause the page to be inaccessible. 
        To give IIS anonymous users access to the Web site folder, method: Enter the folder's security options, add IIS anonymous users, and give the appropriate permissions, generally read and write.

Centos6.5 on ansible to Windows control

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.