惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
D
Docker
有赞技术团队
有赞技术团队
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
H
Help Net Security
美团技术团队
MyScale Blog
MyScale Blog
B
Blog RSS Feed
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
G
Google Developers Blog
月光博客
月光博客
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs

博客园 - Eric Yih

Should be run run adprep when you want to install a higher version of windows controller in an existing forest lsattr command in AIX Consolidate Unix/Linux commands 资料收集 How to block SMB/LDAP/KDC/KPASSWD/NTP ports via firewall svchost.exe占用CPU 100%的解决方法 CVS使用手册 In Mac OS X, how do I create and delete users? Sendmail How to config the AFP Share Server on Mac OS X 10.4/10.5 Server - Eric Yih How to switch 32<->64bit kernel on AIX Dpkg 常用指令操作快速参考 How to create local user use command dscl in Mac 通过 SSH 密钥验证实现在不同系统之间的脚本自动化 How-to: Understanding Mac OS X Open Directory Hands on: Mac OS X Server Mail Service Boot Camp, Part 1: The Basics Hands on: Setting up Mac OS X Open Directory Hands on: Using Apple's Workgroup Manager Configuring Network Information Service server and client on AIX
How to: Add a user from the OS X command line, works with...
Eric Yih · 2010-10-10 · via 博客园 - Eric Yih

Adding a user is something easily accomplished using the built in GUI tools that ship with OS X, however any power user can appreciate the possible efficiency gained from using the command line. So in the spirit of efficiency here are the steps necessary to add a user to your Mac OS X system all with our good friend, Terminal.app.

These commands need to be run as either the root user or with the “sudo” command. For more information on the sudo command see the

sudo man page

.

Create a new entry in the local (/) domain under the category /users.
dscl / -create /Users/toddharris

Create and set the shell property to bash.
dscl / -create /Users/toddharris UserShell /bin/bash

Create and set the user’s full name.
dscl / -create /Users/toddharris RealName "Dr. Todd Harris"

Create and set the user’s ID.
dscl / -create /Users/toddharris UniqueID 503

Create and set the user’s group ID property.
dscl / -create /Users/toddharris PrimaryGroupID 1000

Create and set the user home directory.
dscl / -create /Users/toddharris NFSHomeDirectory /Local/Users/toddharris

Set the password.
dscl / -passwd /Users/toddharris PASSWORD

or

passwd toddharris

If you would like Dr. Harris to be able to perform administrative functions:
dscl / -append /Groups/admin GroupMembership toddharris