Solved

trouble changing the password on a user through DSCL

Posted on 2010-08-12
3
2,760 Views
Last Modified: 2013-12-21
I'm creating a hidden user on some new macs to be used for ARD.  i'm hiding the account to keep my user's from trying to guess the password.

the steps below work fine to create the account but the last step for setting the password fails with the following error
<dscl_cmd> DS Error: 14130 (eDSInvalidRecordType)

This looks like a directory services error but this is a stand alone mac, not attached to any directory.

here are the commands I'm using:
dscl . -create /users/myuser
dscl . -create /users/myuser realname myuser
dscl . -create /users/myuser NFShomedirectory /Users/myuser
dscl . -create /users/myuser usershell /bin/bash
dscl . -create /users/myuser unique 150
dscl . -create /users/myuser primarygroupid 20
dscl . -append /Groups/admin GroupMembership myuser
dscl . -passwd /users/myuser myuserpassword

 like i said, all works well until the final line.
i'm running the commands as root.

0
Comment
Question by:c2media
3 Comments
 
LVL 7

Assisted Solution

by:marook
marook earned 200 total points
ID: 33427291
Not sure why it fails, but one script I have to create that user, uses the -create param to set the PW.

Also, move your user abot UID 400! 499 is the best, unless you have other hidden users on the system.
0
 

Author Comment

by:c2media
ID: 33433638
I've been looking through the man for dscl and i can't figure out how to set the password with -create.  can you let me know the syntax?

Thanks,


 
0
 
LVL 19

Accepted Solution

by:
Kash earned 300 total points
ID: 33472927
cannot you use sudo passwd command to set/change the password once the user has been created.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question