macos

您所在的位置:网站首页 保护树木的一句话简短 macos

macos

2024-01-27 12:30| 来源: 网络整理| 查看: 265

As you asked how to do it from the command line, I take you can open a SSH session for the Mac OS X server, or you can open a terminal window directly from the server.

If this is the case, then execute the following command: sudo dscl . -change /Users/ NFSHomeDirectory ; replace , , and with, respectively, the user name, the old home directory, and the new home directory. The command -change requires the old value of the key being changed; if you don't know the old value, then you cannot do anything.

If you are not using any SSH session, or you cannot open a terminal window in the Mac OS X, but you can still access the server from another Mac, then the command is a little different. The dot after sudo dscl is the datasource is described in the (dscl(1) Mac OS X Manual Page) as the following:

dscl operates on a datasource specified on the command line. This may be a node name or a Mac OS X Server (10.2 or later) host specified by DNS hostname or IP address. Node names may be absolute paths beginning with a slash ("/"), or relative domain paths beginning with a dot (".") character, which specifies the local domain, or "..", specifying the local domain's parent. If the hostname or IP address form is used then the user must specify the -u option and either the -P of -p options to specify an administrative user and password on the remote host to authenticate with to the remote host. The exception to this is if "localhost" is specified. Passing passwords on the command line is inherently insecure and can cause password exposure. For better security do not provide the password as part of the command and you will be securely prompted.

References The manual page installed in every Mac (man dscl) The online dscl(1) Mac OS X Manual Page.


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3