Questions tagged [dscl]

dscl is a general-purpose utility for operating on Directory Service directory nodes.

dscl is a general-purpose utility for operating on Directory Service directory nodes. Its commands allow one to create, read, and manage Directory Service data. If invoked without any commands, dscl runs in an interactive mode, reading commands from standard input. Interactive processing is terminated by the quit command. Leading dashes ("-") are optional for all commands.

dscl operates on a datasource specified on the command line. This may be a node name or a Mac OS X Server (10.2 or later) host specified by DNS hostname or IP address. Node names may be absolute paths beginning with a slash ("/"), or relative domain paths beginning with a dot (".") character, which specifies the local domain, or "..", specifying the local domain's parent. If the hostname or IP address form is used then the user must specify the -u option and either the -P of -p options to specify an administrative user and password on the remote host to authenticate with to the remote host. The exception to this is if "localhost" is specified. Passing passwords on the command line is inherently insecure and can cause password exposure. For better security do not provide the password as part of the command and you will be securely prompted.

27 questions
0
votes
0 answers

Importing .plist with mcximport does not work

I'm trying to setup a policy for a Chrome Extension that supports managed storage. I'm following these steps: https://www.chromium.org/administrators/configuring-policy-for-extensions/ And running these commands as specified, replacing my username…
ES04r3s
  • 29
  • 2
0
votes
1 answer

Why does "dscl . -change /Users/wick RealName" do the job in Terminal but not in ScriptEditor?

root# dscl . -change /Users/default RealName "Brian" "David" When running this command in Terminal the Full Name of the user that is associated with home folder "default" is changed from Brian to David. However when I try to run this command in…
Mikhail Kulin
  • 51
  • 2
  • 11
0
votes
2 answers

dscl create user doesn't work on el capitan

I am trying to create user on OS X El Capitan with admin priviliges from super-user mode. After running /sbin/fsck -fy and /sbin/mount -uw / and launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist everything works. But after…
Jozef Vrana
  • 309
  • 1
  • 5
  • 14
0
votes
1 answer

dscl doesn't work from inside re-attached screen

I am on Mac OS X 10.5.8. I am not sure exactly when this started happening, but I find that when I re-attach to a screen session that was started from an ssh session, anything relying on dscl (directory services), or the underlying getent stuff,…
apinstein
  • 5,105
  • 1
  • 23
  • 22
0
votes
1 answer

Listing non-admin accounts in OS X with dscl

Trying to write a Bash script that will pull all non-admin accounts into an array to which I can then remove the home directories rm -rf /Users/"$USER" and also delete the Sys Pref user dscl . -delete /Users/"$USER". I can pull all admins with dscl…
user3362668
0
votes
1 answer

dscl Command Breaks Login

I am trying to change the user image for the photo account using these dscl commands: sudo dscl . delete /Users/photo Picture sudo dscl . delete /Users/photo JPEGPhoto sudo dscl . create /Users/photo Picture "/Library/User…
0
votes
1 answer

heisenbug: pexpect and changing passwords on Mac OS X over ssh

In my organization, we have many macs running OS X Yosemite. Each of these machines has a default account that our IT team can use to access the machine to provide IT assistance. We want to periodically change the password on this account, and, as…
geekofalltrades
  • 214
  • 1
  • 10
0
votes
1 answer

Authenticating Users on Mac using Cocoa

If I have the following users on my MAC: test1, test2 and test3 And I am logged into test1. And I would like to enable certain feature for test2 through my application. Hence the user test1 has to authenticate by entering the credentials for test2.…
Shanti K
  • 2,873
  • 1
  • 16
  • 31
0
votes
1 answer

Unix user without password still needs password

I created a user on OS X Mavericks – dscl . -create /Users/newuser UserShell /bin/sh – without setting any password. This is confirmed by reading the user file with the dscl interactive prompt. However, when I sudo su newuser and try to su back to…
user1781186
0
votes
1 answer

Proper group/permissions using MAMP site

I'm building a website using MAMP on OS10 Leopard. I'd like to be able to set an publicly accessible upload directory to 0775 and not 0777. I've tried a bunch of combinations in the "Permissions" panel in MAMP. I can get the site running under "www"…
typeoneerror
  • 55,990
  • 32
  • 132
  • 223
-1
votes
1 answer

Get the current macOS shell using Qt

According to this I can get it using this command: dscl . -read ~/ UserShell So, I wrote this code using Qt: QProcess p; p.setProcessChannelMode(QProcess::MergedChannels); p.start("dscl", QStringList() << "." << "-read" << "~/" <<…
Alexander Dyagilev
  • 1,139
  • 1
  • 15
  • 43
-1
votes
2 answers

Mac OS X Create User Script for 10.9 to 10.11

I would like to make a script, which checks the OS X Version and depending on that sysadminctl or dscl are invoked. As you can see, the script is checking the OS Version and checking the next available UserID. After that, the script jumps to the end…
holger
  • 1
  • 1
1
2