【问题标题】:Generate OAuth2 token for Google Apps Directory Sync without a GUI在没有 GUI 的情况下为 Google Apps Directory Sync 生成 OAuth2 令牌
【发布时间】:2015-03-23 01:27:20
【问题描述】:

设置 Google Apps Directory Sync (GADS) 的说明说使用 config-manager 来获取 OAuth2 令牌。配置管理器使用 GUI。我正在尝试在没有桌面的 Linux 服务器上设置 GADS。

有没有什么方法可以在没有完整的可视化用户界面的情况下从命令行完成这项任务?

【问题讨论】:

    标签: oauth-2.0 google-apps


    【解决方案1】:

    分步过程如下:

    1. 在图形桌面 (Windows/Mac/Linux) 上设置 GADS,选择 根据需要提供各种选项并保存配置文件(xml 文件)。
    2. 在您的非 GUI 机器(例如 Linux 服务器)上安装 GADS。
    3. 将步骤 1 中创建的 xml 配置文件复制到此非 GUI 设置,然后运行this Google's product support page 中列出的命令以重新设置密码和身份验证令牌,例如 Oauth2 令牌。

    为了完整起见,我列出了命令(假设您从安装目录运行,例如 Linux 下的/usr/local/GoogleAppsDirSync):

    • 要重置您的 LDAP 凭据,请输入:

      ./upgrade-config -ldapuser LDAP_username -ldappassword LDAP_password -c config_file_name

    • 要通过 OAuth 授权您的 Google Apps 域,请输入:

      ./upgrade-config -Oauth Google_Apps_domain_name -c config_file_name

    系统会提示您将长 URL 复制粘贴到图形浏览器中以获取 Oauth 令牌,需要将其复制回命令行提示符以设置令牌。

    • 测试 LDAP 连接,输入:

      ./upgrade-config -testldap -c config_file_name

    • 测试 Google Apps 连接,输入:

      ./upgrade-config -testgoogleapps -c config_file_name

    【讨论】:

      猜你喜欢
      • 2013-09-05
      • 2019-09-08
      • 1970-01-01
      • 2021-01-20
      • 2016-02-01
      • 1970-01-01
      • 2013-08-30
      • 1970-01-01
      • 2016-09-01
      相关资源
      最近更新 更多