【问题标题】:What is the OS X equivalent of "useradd -r -d /opt/otrs/ -c 'OTRS user' otrs" and "usermod -G nogroup otrs www-data"OS X 相当于“useradd -r -d /opt/otrs/ -c 'OTRS user' otrs”和“usermod -G nogroup otrs www-data”
【发布时间】:2015-01-26 04:18:22
【问题描述】:

我正在尝试在 Mac 上安装 otrs。我想知道以下命令的 OS X 等效项是什么?

useradd -r -d /opt/otrs/ -c 'OTRS user' otrs
usermod -G nogroup otrs www-data

【问题讨论】:

    标签: linux macos bash permissions otrs


    【解决方案1】:

    以下链接可能会有所帮助:http://www.maclife.com/article/columns/terminal_101_creating_new_users

    此脚本提供了更多信息和示例:http://wiki.freegeek.org/index.php/Mac_OSX_adduser_script

    据此,以下命令应该做到这一点:

    dscl . create /Users/otrs
    dscl . create /Users/otrs RealName "OTRS user"
    dscl . create /Users/otrs NFSHomeDirectory /opt/otrs
    dseditgroup -o edit -t user -a otrs nogroup
    dseditgroup -o edit -t user -a otrs otrs
    dseditgroup -o edit -t user -a otrs www-data
    

    【讨论】:

    • 您还需要将UniqueID 设置为唯一的值(对于系统用户,这应该小于500),并将PrimaryGroupID 设置为-1(无组)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多