Creating User Acct's in Open Directory from External Source

Hello,
I am trying to find a way to automate the creation of user accounts in OpenDirectory. I have a MS SQL database that has the usernames and passwords in it now, and I'm looking to export those out of there and have an automatic way to create matching accounts in the OpenDirectory service on OSX Server.
Gary

It's unfortunate that there's no better way to do this. We're using ssh with a pre-shared key to our Open Directory server to run a script which runs dsimport to create the accounts on the Open Directory.
This works fine for importing/creating accounts, but it doesn't help us change passwords that we are pushing down to Open Directory from our metadirectory solution.
Here's the python we use to generate the dsimport entries:
dsimport_base = '0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Users 11 dsAttrTypeStandard:RecordName dsAttrTypeStandard:GeneratedUID dsAttrTypeStandard:AuthMethod dsAttrTypeStandard:Password dsAttrTypeStandard:UniqueID dsAttrTypeStan\
dard:PrimaryGroupID dsAttrTypeStandard:RealName dsAttrTypeStandard:UserShell dsAttrTypeStandard:HomeDirectory dsAttrTypeStandard:EMailAddress dsAttrTypeNative:postOfficeBox'
dsimport_entry = '%s:%s:dsAuthMethodStandard\\:dsAuthClearText:%s:%s:%s:%s:%s:%s:%s:Ganymede managed [%s]'
params = (obj.Username,
obj.Global_UID,
obj.Password.plaintext,
obj.UID,
self.getPrimaryGID(obj),
obj.Full_Name,
obj.Login_Shell,
'/Users/' + obj.Username,
obj.Username + '@arlut.utexas.edu',
obj._oid)
new_entry = dsimport_base + '\n' + dsimport_entry % tuple([str(value).replace(':', '\\:') for value in params]) + '\n' # not handling signature aliases yet
and here's the Perl that is run on the far end of the ssh pipeline which
reads the list of 'new_entry' lines generated by our Python:
#!/usr/bin/perl
# This script receives files on STDIN and runs dsimport on them.
# Jonathan Abbey
# 22 October 2009
use File::Temp qw/ tempfile tempdir /;
$adminuser = 'diradmin';
$adminpass = 'seekret';
($fh, $filename) = tempfile();
@users = ();
while () {
if (/^([^0][^:]+):/) {
push(@users, $1);
print $_;
print $fh $_;
close($fh);
system('/usr/bin/dsimport', '-g', $filename, '/LDAPv3/127.0.0.1', 'O', '-u', $adminuser, '-p', $adminpass, '-v');
unlink($filename);
foreach $user (@users) {
system('/usr/bin/pwpolicy', '-a', $adminuser, '-p', $adminpass, '-u', $user, '-setpolicy', 'canModifyPasswordforSelf=0');
We've been trying to use kadmin to change passwords, but it seems flaky, with occasional 'policy reject' complaints breaking the sync.

Similar Messages

  • FF 3.6.12 will not open links from external sources (Outlook, Dreamweaver, Digsby, etc)

    I have just upgraded to Firefox 3.6.12 and links clicked in an external source will not open in Firefox.
    Firefox is set as my default program for web browsing. I have tried to open links from Outlook, Dreamweaver, Digsby, and other programs.

    I have the same issue, opening links from external programs like Word or Thunderbird does not work. This used to work before the update to 3.6.12

  • How to populate target directory from the source XML in Receiver File Adap?

    Hi All,
    Our scenario is IDoc - XI -(Receiver File adapter) File. Is it possible to populate complete "Target Directory" from the source XML message??
    Lets say we added field to maintain target directory in Idoc structure and some how populated value to it, then grab this target directory from the IDoc-XML and pass in Comunication Channel. I think its possible through Variable Substitation ...just want to make sure and if sombody has done the similar scenario their inputs would be great.
    Thanx
    Navin

    Hi,
    Please see the belowlinks
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    /people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios
    Re: Dynamic  File Name for Receiver File Adapter
    Variable Substitution
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    try with adapter specific
    Example code...
    String newfilename="";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // Get Sourcefilename
    String oldfilename=conf.get(key);
    //extract first 3 chars of source filename
    newfilename=oldfilename.substring(0,2);
    //get the date
    java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
    dateformat.format( new java.util.Date() );
    //append sourcedateL
    newfilename=newfilenamedateformat"L";
    // determine if prod/ dev / qa
    map = container.getTransformationParameters();
    senderService = (String) map.get("SenderService");
    if(senderServcie.equald("Prod"){
    newfilename=newfilename+"P";
    // change to new file name
    conf.put(key, newfilename+".tmp");
    Change it according to your requirement
    Regards
    Chilla..

  • How to import user profiles from external sources(other than AD) into SharePoint

    Hi,
    I want to import user profiles from external sources other than AD.
    Badri

    You have to use BCS for importing the profiles,
    Check the following link with explanations
    http://msdn.microsoft.com/en-us/magazine/ee819133.aspx
    Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem

  • How to merge key field from external source system with SAP R/3 master

    Hi,
    In SAP BW 7.0 system, our scenario is Master Data for 0GL_ACCOUNT is coming from SAP R/3 alongwith the Transactional data records for standard FI cubes. Then, one more set of transaction data is coming from external source system, a flat file, into another custom DSO(ZDSO_FI), which also has this GL Account field.
    This flat file's GL account, GL_file, has to be basically mapped/merged with the standard 0GL_ACCOUNT field so that at the time of loading the transactional data for custom DSO, ZDSO_FI (with transformation mapping GL_file > 0GL_ACCOUNT), system automatically refers to the 0GL_ACCOUNT master data to load these incoming transactional values, from the external flat file system. How can this be done?
    To illustrate the scenario, say I have 5 records in 0GL_ACCOUNT, loaded from SAP R/3 into SAP BW-
    0GL_ACCOUNT      Short Description     Source System
    100                                   D1                          R/3
    200                                   D2                          R/3
    300                                   D3                          R/3
    400                                   D4                          R/3
    500                                   D5                          R/3
    Now suppose if my flat file has following sample transactional data, to be uploaded in SAP BW  ZDSO_FI-
    GL_file      Key Figure1
    400          789
    200          567
    Then after uploading this transactional data in ZDSO_FI (with transformation mapping GL_file > 0GL_ACCOUNT), the 0GL_ACCOUNT data becomes as below-
    0GL_ACCOUNT      Short Description     Source System
    400
    200
    100                                   D1                          R/3
    200                                   D2                          R/3
    300                                   D3                          R/3
    400                                   D4                          R/3
    500                                   D5                          R/3
    So note that the system did not refer the incoming GL's from flat file, although the field is mapped to 0GL_ACCOUNT in transformation, to the already available master data. Rather created 2 new data rows for the GL accounts coming from external system. Because of this I am not able to perform the calculations common from standard FI cube and ZDSO_FI, with GL account as key field. I need to synchronise these data values based on GL Account to proceed with further calculation and am badly stuck.
    Request if anyone can please throw some light on how to achieve this seemingly simple requirement?
    Thanks in advance.
    Nirmit

    Better post this thread is in the [Enterprise Data Warehousing|Data Warehousing; forum.

  • I can't paste text from external sources into Photoshop CC 2014.

    Hello everyone,
    Since a few days I'm not able to paste texts from external sources into Photoshop CC 2014.
    I never have problems with Photoshop CC before.
    I have the new iOS Yosemite installed in my macbook.
    It's really frustrating, can someone help please?

    I have basically the same setup, except on a Mac Mini. I am unable to reproduce your problem. Double check that you are copying the original text in the first place, and then make sure you are pasting into a text layer as you cannot paste into a regular Photoshop layer -- nothing will happen. Create a text layer by clicking on a regular layer with the text tool, the T in the tool box. The new layer will show up in the layers panel identified by the first line of the text.

  • Purchase of variant configuration material from external source

    Hi,
    I am working with variant configuration scenario , Here some material procured from external source and per characteristics requirements , these characteristics have varied price , these price should be maintain at condition level .
    The Material purchases from external source its price according to characteristic select.
    Pl helps me how these scenario resolve.

    H Rajesh,
    1.Create another New characteristic called ZPrice .Give the description and go directly to Addnl Data Tab.Here in the table name Enter "MMCOM" and in the Field Name Enter "VKOND" at CT04 & save .
    2.Now Goto CT04 in change mode, for Zprice Go to values tab and select RED &.Goto Extras-> Object Dependencies->Editor and then select Procedure & define condition.
    3. Goto Inforecord Choose Extras ->Variant conditions.
    Enter a variant key. Choose the desired condition type and specify the period during which the discounts and surcharges are to apply.
    Enter the amount and save.
    For More help please Refer Below SAP link
    [Variant Configuration |http://help.sap.com/saphelp_47x200/helpdata/en/92/58d455417011d189ec0000e81ddfac/frameset.htm]
    Regards
    Pradeep
    Edited by: Pradeep Kumar on Mar 4, 2008 10:36 AM
    Edited by: Pradeep Kumar on Mar 4, 2008 10:37 AM

  • Users cannot connect to Open Directory Leopard server

    Just testing Leopard server and running into all sorts of problems...
    Clean install of Leopard Server running DNS, AFP and Open Directory.
    Set up DNS first and checked both forward and reverse look-up was correct.
    Promoted to Open Directory master from Standalone.
    Created two test user accounts (without Home directories) and gave them access to a specific sharepoint.
    Setup LDAP on the client machine (Leopard client) and could see the user accounts in the Directory app.
    Try to log in.....'username or password incorrect'.
    Check the OD logs and cannot find any reference to the attempted log-in.
    I understand that it appears that user accounts require a Home Directory in Leopard, regardless of whether you actually want one (I don't). I tried creating a home directory using Workgroup Manager but as noted in other threads, the 'create home directory' button doesn't work.
    I then created a home directory via the command line for one of the user accounts but am still unable to log-in.
    Any ideas?
    Thanks.

    This may be a stupid question but have you run sudo chown on the user's home directory after creating it?
    I had the same problem and my solution is posted here: http://discussions.apple.com/thread.jspa?threadID=1290158&tstart=0
    Let me know if that works. If not, we'll work on it together.

  • How to migrate Open Directory from 10.6 to another server with 10.8?

    Hello all,
    I have a Mac Pro running Mac OS X Server 10.6.8 with Open Directory active. Now I bought a new Mac Pro running MAC OS 10.8 and I also bought the OS X Server app.
    What I want to know is how can I migrate the users and their home folders from old server with Snow Leopard to the new one? The Open Directory Archive does this job?
    Regards,
    Carlos.

    Ok. I did a test and I saw that it exports only the information account. So I suppose that I have to copy the home folder using scp or something similar. Is that correct? 
    I also have to keep the same hostname from the old server in the new server or this can be done in a different way?
    Thanks.

  • Join Open Directory from Windows xp

    Hello,
    I made Open Directory on Mac OS X Server and Mac users successfully joined my domain, no I need to configure my windows xp users to join the domain too, can anybody provide me how to do this.

    I have done what you said exactly, I added SMB service with Server Admin and on settings I chose it as Primary Domain Controller (PDC) - Computer Name (Server) - Domain (Server.com) then I moved to Windows XP to join it, I did not change the DNS Server because it's allocated on another windows server. I did the following: Domain (server.com) and it asks for the administrator username & password and I am asking which administrator account to be used the Local Administrator of the server or the Directory Administrator?

  • Few Users are unable to open reports from workspace

    Hi ,
    Few users are nt able to open reports from workspace. Can anyone let em know what all privalleges we need to give for the users who want to open reports.
    Thanks in Advance

    In general if a user can see a report and cannot open, this should be related with the application security that the reports' grid is connecting.
    If opening request from users are failing with an error, please paste the error here,
    Sometimes reports may be open with blank pages or no data, make sure users have necessary access to data...easy way to check this, connect to application and try to retrieve data from application, Lets say your report grid is connecting to Essbase, try if you can retrieve same grid from essbase excel add-in.
    Good Luck,
    Ahmet

  • Create a new dimension in business layer from Data source: text file on the web

    Hi,
    I have a text data source which is published every few hours that is accessible from a certain URL. I follow the instruction given in this http://scn.sap.com/docs/DOC-43144 - where it shows in great detail how to create the connection, data foundation as well as business layer to create a universe for this type of data.
    All is well - I can use this universe in my WEBI doc and display the data.
    However, in order for me to merge the data from this universe with another universe, I need to create  new dimension based on the data from the text file. The new dimension value is simply the first 4 characters of the Subject found in the text file. The "Subject" dimension is of variant type: varchar.
    Following the guide mentioned earlier, the connection is using SAP BO OpenConnectivity driver. And this driver limits severely the SQL statement that I can use to extract a substring of another string. Here's the screenshot of the SQl expression that I can use with this driver
    After hours of searching, I cannot find any other connection driver for a text file that's published on a certain URL. The BO OpenConnection driver is the best that I could find.
    So here are my problems
    1. one of my data source is a text file published on a web
    2. the only connection I can create does not allow me to create  new dimension in the universe to create an important column "subject ID"
    3. I can create the column in webi as a variable. But when I do so, I cannot merge it with existing dimension (webi not allowing to merge these 2 types). And without the merge, the flat file universe with my database universe can't be combined.
    I'm using WEBI Rich client version 4.1 SP3 Patch 1. Build 14.1.3.1300
    Is there any other idea that you can suggest without requiring to change the extracted data?
    Thanks.
    With warm regards

    Hi Bala,
    Were you able to find out a solution for the problem with uploading values for a variable from a text file on the web?  I am confronted with the same request from users.
    Thanks,
    BQ

  • Can't open pdf from single source & 9.3 won't install

    I receive a weekly update from a source.  Until Jan.22 had no trouble
    accessing it.  Now when I click the link it goes to the link's site but no pdf appea
    rs, just a a normal site page
    w/o the acrobat background  I am on Vista platform,and IE8..  I can access this link from my laptop Also tried to upgrade from 9.0 to 9.3.  Download finished  but installation could not be completed. Said there were files open that were being used.  I had no other files open.  I am very frustrated and
    I am not experienced enough to know what to do.

    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store or have a Recent Mac you can find it in your Purchases List.

  • User is not able to Login from external supplier, using the WSS (ICH)

    Hi Gurus,
    The user is not able to login to the server externally from url.
    dev_icm is giving below warnings:
    [Thr 11052] IcmWatchDogThread: watchdog started
    [Thr 11309] ** WARNING => HttpPlugInInit: Parameter icm/HTTPS/trust_client_with_issuer or icm/HTTPS/trust_client_with_subject not set  => do
    not trust any intermediary*
    X.509 cert data will be removed from header [http_plg_mt. 720]
    [Thr 11309] =================================================
    [Thr 11309] = SSL Initialization  on  IBM RS/6000 with AIX
    [Thr 11309] =   (700_REL,May  3 2008,mt,ascii-uc,SAP_UC/size_t/void* = 16/64/64)
    [Thr 11309]   profile param "ssl/ssl_lib" = "/usr/sap/SCA/SYS/exe/run/libsapcrypto.o"
               resulting Filename = "/usr/sap/SCA/SYS/exe/run/libsapcrypto.o"
    [Thr 11309] =   found SAPCRYPTOLIB  5.5.5C pl16  (Jun 10 2004) MT-safe
    [Thr 11309] =   current UserID: "scaadm",  env-var USER="scaadm"
    [Thr 11309] =   using SECUDIR=/usr/sap/SCA/DVEBMGS41/sec
    [Thr 11309] =  secudessl_Create_SSL_CTX():  PSE "/usr/sap/SCA/DVEBMGS41/sec/SAPSSLA.pse" not found,
    [Thr 11309] =      using PSE "/usr/sap/SCA/DVEBMGS41/sec/SAPSSLC.pse" as fallback
    [Thr 11309] = Success -- SapCryptoLib SSL ready!
    [Thr 11309] =================================================
    HTTPS (SSL) settings are as below, i think which means that no ssl certifiacts are required.
    icm/HTTPS/verify_client        = 0
    Kindly help urgently.
    regards,
    MJ

    this is SCM system.
    SSL CA's are set.
    what should be value of the parameters?
    icm/HTTPS/trust_ client_with_ issuer or
    icm/HTTPS/trust_ client_with_ subject
    http and https ssl conections are correctly set.
    I think the SAPSSLA. pse" not found, is not the problem as the parameter icm/HTTPS/verify_ client = 0 is set, it means that no ssl certifiacts are required.
    problem is coming when the system is being accessed from externally using other secure domain name.
    the system is being accessed ok from web urs which is internal, but not external.
    for example in strust tcode  the domain name is *abc.com, which is running fine when accessing the system internally.
    but when the user is accessing this sytem from other secure login from *xyz.com, which is also the same companys domain, then the user not able to login, its showing errir.

  • How to get data from external source

    Hi experts,
       I want to get data from a different source e.g. from oracle. How can i get the data in BW??
    Sam

    Hi Samir
    there are different interfaces are available according to the source system.
    For Oracle source system you can use DB connect interface.
    you can extract data from several data sources to BI
    File Interface:: Using this interface, you can access files in ASCII format or CSV format
    DB Connect :: You use DB Connect to open other database connections in addition to the default connection and use these connections to transfer data from tables or views into a BI system.
    UD Connect :: UD Connect (Universal Data Connect) uses the Application Server J2EE connectivity to enable the reporting and analysis of both SAP and non-SAP data. Using UD Connect, you can access all relational and multidimensional data sources. UD Connect transfers the data as flat data.
    BI Service API ::
    Web Service for Staging ::You use the Web service to write the data from the source into the PSA. The transfer of data is controlled externally, without placing demand on BI.
    You can use this interface in conjunction with real-time data acquisition.
    Please assign points if this info helps.
    Regards
    Vivek..

Maybe you are looking for

  • Windows 8.1 iTunes download - possible without an IT degree?

    I am a complete green horn.  I am absolutely appalled at how how difficult it is to find the information I require on installing iTunes on my Windos 8.1 laptop.  I go to the apple site.  I click on the download icon for iTunes.  But absolutely NOTHIN

  • Create report to check what software were installed from which BDP

    Hi, I need assistance to create a report that shows which software were installed from which BDP. How would one go about doing this? Thank you in advance

  • In house production time and delivery date on PO

    Hi Gurus, Can anybody please calrify the following for me? Plant A is procuring material X from PlantB via STO. The planned delivery time for the material in plant A is 21 days. The in house production time of the material in plant B is 3 days. When

  • Iphone 5 camera is blurry

    My iphone fell down and when i tried to take a picture with it, the camera went blurry and made weird noises. Whenever i reopen the camera its ok for a second and then it goes blurry and noisy again. What shall i do?

  • ACS and AD groups

    I have ACS v5 connected to a Windows 2008 AD. Why cant I see any other groups besides the default builtin or Users?  If I set my Base DN to search for groups :  CN=Groups,DC=LAB,DC=LOCAL, I do not see any groups listed within it. But if I do CN=Built