Solved

trouble changing the password on a user through DSCL

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

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.
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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 …

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now