![]() The passwd command can be used to add a password or replace the old password of a user with a new one. command is an alias for the read command and points to the local directory in the above code. Along with dscl, the create command can be used to create a record in a specified directory. ![]() Hence, we write New user as New\ user in the above code.ĭscl is a command line utility for operating on Directory Service directory nodes. This will prevent the shell interpreter from interpreting the space as a separator and assuming they were two different arguments. ![]() In Bash, before inserting space while defining file or folder names, we use a backslash \ to separate the characters. append /Groups/admin GroupMembership New\ user If this line is not included the user will be set as standard user. create /Users/New\ user NFSHomeDirectory /Local/Users/New\ user create /Users/New\ user UserShell /bin/bash # Set the shell interpreter to Bash for New\ user create /Users/New\ user PrimaryGroupID 20 Replace with a number that is not already taken. ![]() create /Users/New\ user picture “/path to picture.png” create /Users/New\ user hint “Password Hint” # Replace password_here with your desired password to set the password for this user create /Users/New\ user RealName "John Doe" # Add the display name of the User as John Doe # Create a new user with the username New user
0 Comments
Leave a Reply. |