Solved

trouble changing the password on a user through DSCL

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

17 Experts available now in Live!

Get 1:1 Help Now