Solved

trouble changing the password on a user through DSCL

Posted on 2010-08-12
3
2,729 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mac Infection 16 51
Shell Script on AIX 7 96
MacBook wifi issues 6 38
Reinstall Sierra OS - keyboard/mouse OK -but without display 7 33
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

776 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