Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

trouble changing the password on a user through DSCL

Posted on 2010-08-12
3
Medium Priority
?
2,937 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Assisted Solution

by:marook
marook earned 800 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 1200 total points
ID: 33472927
cannot you use sudo passwd command to set/change the password once the user has been created.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
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…

721 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