dscl
Scott Haneda
talklists at newgeo.com
Thu Sep 17 18:44:26 PDT 2009
Hello, I am working on trying to make a change to a port that does not
have user and group adding abilities, but it probably should. At this
point, I need to confirm this by adding a user and group by hand,
using dscl in Mac OS X 10.5
I took this from some old docs on dovecot:
sudo dscl . -create /Groups/_ftpg
sudo dscl . -create /Groups/_ftpg UniqueID 490
sudo dscl . -create /Users/_ftpu
sudo dscl . -create /Users/_ftpu UserShell /usr/bin/false
sudo dscl . -create /Users/_ftpu RealName "PureFTPd FTP Server"
sudo dscl . -create /Users/_ftpu UniqueID 490
sudo dscl . -create /Users/_ftpu PrimaryGroupID 490
sudo dscl . -create /Users/_ftpu NFSHomeDirectory /var/empty
This sort of works. In this case, the ftpd has a flag to "auto create
home dirs", which I have enabled. I have told the ftpd to use user
and group 490. On first ftp login, it will create the directory I
tell it to:
drwxr-x--- 2 _ftpu 490 68 Sep 17 18:42 someplace
As you can see, there is something wrong with the group.
$sudo chgrp _ftpg someplace/
drwxr-x--- 2 _ftpu nobody 68 Sep 17 18:42 someplace
I think what I would really like to do is also create a user and group
more like www and mysql, where they have both the _foo and foo
version, but I can not figure this out.
$dscl . -read /Users/_mysqlAppleMetaNodeLocation: /Local/
DefaultNFSHomeDirectory: /var/emptyPassword: *PrimaryGroupID: 74
RealName:
MySQL Server
RecordName: _mysql mysql
RecordType: dsRecTypeStandard:Users
UniqueID: 74
UserShell: /usr/bin/false
Thanks for any suggestions
--
Scott * If you contact me off list replace talklists@ with scott@ *
More information about the macports-dev
mailing list