Creating Users via Command Line/Terminal

Hey Everyone!
A Happy New Year to all! I hope that it was a good way to end your 2005 and I hope your 2006 looks to be promising!
Now back to the tough stuff.
Does anyone have a detailed example of how to create a user (user name, short name, password) assign them to a group(s), and set an expiration date for that account?
I'm guessing that there is a single string that could be entered into Terminal that would do all of this. I've read the man page for dscl but I honestly dont know how to interpret it as I'm not TOO fluent with Terminal yet. Yes I understand it can be dangerous to work inside Terminal which is why I'm asking for an assistance in translating the man page to english

dscl -u $ADMIN -P $PASSWORD /LDAPv3/127.0.0.1 -create /Users/$shortname
dscl -u $ADMIN -P $PASSWORD /LDAPv3/127.0.0.1 -create /Users/$shortname UniqueID $4
dscl -u $ADMIN -P $PASSWORD /LDAPv3/127.0.0.1 -create /Users/$shortname RealName $shortnam
PowerMac G4 1.25DP   Mac OS X (10.4.1)  

Similar Messages

  • Add user via command line

    I am running Oracle8 PE on Windows NT and need to add a user to the database with a specific role. I nned to do this without using the navigator. I need to add the user to multiple machines remotely. Is there a command line tool fo this or can I import the user table?

    I am running Oracle8 PE on Windows NT and need to add a user to the database with a specific role. I nned to do this without using the navigator. I need to add the user to multiple machines remotely. Is there a command line tool fo this or can I import the user table? You can use SQL*PLUS:
    connect <user>/<password>@remoteDB
    create user <> identified by <>
    default tablespace <>
    temporary tablespace <>;

  • Creating ACLs via command-line

    Is it possible to create ACLs using a command-line utility?
    We are developing an application that will initially have 5000 users and will expand to 15000 users.
    When new users are detected in Microsoft Exchange we create a new user using the command-line (unix) but we also need to create a custom ACL for that user that includes existing ACEs for existing GROUPS that will be providing support.
    This is so that we can drop new Oracle reports into the users folders (again using command-line utilities) and have the reports use the ACL from the folder they are dropped into.
    Thanks for any help.
    null

    Thanks for your response Tom. See my post above 15 items down labeled 'TAR submitted ...'.
    Oracle provided sample code (listed in the above mentioned POST) that works just fine to create ACLs.
    I am very interested in your suggestion to us an agent though because there does not appear to be any way to 'manage' objects (delete groups/acls, etc) through XML.
    Also, Joyce indicated several weeks ago that Oracle does not support loading the class files and using Java from with Oracle DB to manage the objects.
    Our application will rollout in a few weeks and we still need to automate the management of user creation/deletion as well as ACL modification for over 5,000 users.
    The application is to automate the production and distribution of weekly reports using Oracle Reports server to produce PDF report files.
    The biggest problem area is not the mechanical process of creating the reports but rather the proper architecture to enable our customer service and technical support departments to assist the users when problems arise.
    Our current approace is:
    1. Create a custom ACL for each user with ACEs that allow the proper access by tech support and customer service.
    2. Create a report folder for each user, owned by system with the user's custom ACL applied to it.
    3. Automatically generate the reports with Oracle Reports server, and load them into IFS using XML files. Prior to the load IFSMODE is used to have the user's report folder ACL (the PARENT) assigned to the report when it is loaded.
    We would like tech support to be able to rerun a user's report if necessary but we can't figure out how to let tech support use the UI to submit the job to the report server, load the report into IFS and assign the proper ACL.
    Will the soon-to-be-released IFS 1.1 allow its Java classes to be loaded in the soon-to-be-released 8.1.7 so that IFS management can be handled from within the database?
    One last note - there are at least a dozen requests in this forum for more extensive documentation on using XML to automate the IFS functionality.
    I would be willing to assist in any such project you guys put together including, writing or proofing documentation, testing sample code, etc. I would need to do this after hours on my NT environment.
    Thanks again for the response.
    null

  • Changing the default keyboard language for all users via command line

    I have about 250 computers, that I set the wrong default language on.
    I am hoping someone here can help me. I have 3 keyboard languages installed in my labs,
    En-English (United States)
    Fr-French (Canada)
    En-English (Canada)
    I'd like to make the Fr-French (Canada) the default keyboard language for all users that login I have tried the following xml but it's not working. I do not see the problem any help would be appreciated.
    I tried to run it by doing this
    control intl.cpl,, /f:"FR-DefaultKeyboard.xml"
    The following code below is called FR-DefaultKeyboard.xml file.
    <gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
    <!--User List-->
    <gs:UserList>
    <gs:User UserID="Current"/>
    </gs:UserList>
    <!--User Locale-->
    <gs:UserLocale>
    <gs:Locale Name="FR-CA" SetAsCurrent="true"/>
    </gs:UserLocale>
    </gs:GlobalizationServices>

    <gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
    <gs:UserList>
    <gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
    </gs:UserList>
    <gs:InputPreferences>
    <!--English US EN-->
    <gs:InputLanguageID Action="add" ID="0409:00000409" Default="false"/>
    <!--French CA CA FR-->
    <gs:InputLanguageID Action="add" ID="0c0c:00000c0c" Default="true"/>
    <!--English CA EN-->
    <gs:InputLanguageID Action="add" ID="1009:00001009" Default="false"/>
    </gs:InputPreferences>
    </gs:GlobalizationServices>
    This worked, thank you

  • [SOLVED] How to Create an Image from UTF8 Text via Command-line

    As the title points out, I'm trying to create an image from unicode text via command line. I tried...
    convert -pointsize 48 -size 400 caption:测试用 text.png
    But that results in question marks for the Chinese characters. So searching around online I discovered that I needed to specify a font which could display the characters. The characters show up just fine in Firefox, KDE, Kate, Terminal, etc so I know I have a font which can render them. I thought it might be DejaVu but this also resulted in question marks...
    convert -font /usr/share/fonts/TTF/DejaVuSerif.ttf -pointsize 48 -size 400 caption:测试用 text.png
    Any ideas?
    Last edited by tony5429 (2011-01-31 23:17:41)

    DejaVu doesn't contain those Chinese glyphs at all, so please don't blame ImageMagick for not rendering them.
    So, Firefox, Kate, Terminal and the others you stated to use DejaVu, if encounter these characters, fall back to some other fonts to render them. These fonts are, however, not vector, but bitmap fonts. (This can be seen if you increase text size (Ctrl++ in Firefox): the Chinese characters don't change, they remain of their inherent size.)
    Actually, e.g. /usr/share/fonts/misc/18x18ko.pcf.gz definitely contains the three example characters, so the mentioned apps may use this font as fall back.
    Apparently ImageMagick doesn't handle bitmap fonts (I'm not sure), so you won't be able to hit your original target. Anyway, since you tried to parse "-pointsize 48", you wouldn't be satisfied with the font size.
    Your only choice seems to be using the above mentioned CJK-approved TTFs.
    EDIT: typo
    Last edited by barto (2011-01-28 21:52:33)

  • Running reports via command-line with /batch option

    Hi,
    I have created a batch file which runs, and exports the results of 7 different discoverer reports with /batch option.
    Contents of batch file:
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input1.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input2.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input3.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input4.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input5.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input6.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input7.txt"
    Sample of a cmd file the bacth file runs:....
    /connect user/password@oraprd /apps_responsibility "BIS Super User"
    /open "H:\Projects\DRP Import Modelling\Dev\Intransit Extract.dis"
    /sheet 1 /export xls "H:\Projects\DRP Import Modelling\automation\Intransit Input.xls" /batch
    The batch file runs ok and processes each report in sequence, and creates the excel export one after the other.
    However, I need to process the 7 reports in parallel, so changed the batch file to process in own thread :
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input1.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input2.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input3.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input4.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input5.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input6.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input7.txt"
    The reports kick off at the same time and I can see 7 dis4usr.exe processes running via task manager
    Problem:
    The first reports runs and exports ok.
    All the others dis4usr.exe processing stops with the following error pop-up:
    ! Could not open file. OK
    Question:
    Can you only process reports sequentially via command line mode with /batch option?
    If not...what am I missing...its driving me insane :)
    All asistance is greatly appreciated. Thanks

    Ladies and gentlemen.....I have solved my problemo!
    The reason why the rest of the reports were getting the 'could not open file.' error was due to the fact that each discoverer instance launched was
    trying to access the same standard log file simultaneously.
    I modified each cmd file to write logging info to individual files: eg
    /logfile "H:\Projects\DRP Import Modelling\Automation\input2_log.txt"
    Now that's there's no contention with logging, the reports are firing off beautifully in parallel :)
    I am definitely having a beer this evening!
    Thanks for everyone's input...kept me on the righteous path :)

  • How can I install on Windows remotely via command line?

    Hello Folks.
    I want to install an application on Windows remotely and via command line, For example, I need a tool like Psexec or WMIC but I don't like the user understand it. Any idea? 

    Hi,
    Please also refer to following FAQ article and check if those four general ways will meet your requirement.
    [Forum FAQ] How to deploy applications remotely
    If any update, please feel free to let us know.
    Hope this helps.
    Best regards,
    Justin Gu
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Tool for Creating Tracks per command line available?

    Hi all,
    for my master thesis I need to make up a development concept with the JDI.
    What I'm wondering is, is there any ability (maybe hidden option ) to create tracks per command line interface and connect them per command line?
    Another question which came to mind, I would like to control the DTR via the DTR command line tool, is there any option to do this, just without installing the Developer Studio IDE, as I only want to remote control the DTR via command line and don't need developer equipment on the server?
    Thanks for your help!

    Hi Matthias,
    tracks are stored in the Java database by CMS in its own format and when a buildspace is created on CBS that information is also stored in the Java databse in CBS' own format. Accessing the database directly is not a good idea as you would need additional information that is neither officially published nor supported and that may change.
    Regarding DTR client & IDE: Well, DTR doesn't know about tracks at all, it just stores the sources for track content. The "track" knowledge is part of CMS.
    The command line tool is only distributed with the IDE, but if you just copy the required libraries to the server (you had to edit the batchfile anyway, didn't you?) you do not need the full IDE installation.
    Regards,
    Marc

  • Turn on "Real-time preotection" via command line

    Hello!
    We have a cient without networking resources and I need to turn on the "Real-time protection" which is currently in OFF state.
    How can I do that via command line?
    I tried to review the "mpcmdrun" command but did not found proper switch to turning on this service.
    Regards, 
    Tamas

    You could do a regedit command to silently import a .reg file with the setting in it:
    create a .reg file from the following key:
    HKLM\SOFTWARE\Policies\Microsoft\Microsoft Antimalware\Real-Time Protection
    Name: DisableRealtimeMonitoring
    Type: REG_DWORD
    Data: 0
    Then import it silently with this command:
    regedit /s C:\ExamplePath\Example.reg
    You could also do a PowerShell command:
    Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Microsoft Antimalware\Real-Time Protection' -Name DisableRealtimeMonitoring -Value 0

  • Unable to Launch FMEL via Command Line for Osprey 460e Simulstream Mode

    Subject: Unable to Launch Flash Media Encoder Live v3.2 via Command Line for Windows 2008 for Osprey 460e Simulstream Mode.
    Dear Users,
    Its urgent and I request you to looking into the problem and oblige.
    We are facing problem in command line section of Flash Media Encoder Live v3.2 while using  Osprey 460e Device Capture.
    When we are launching the setup via GUI mode of Adobe Flash Media Encoder Live then its showing fine, However when we are trying to execute the same using the commandline then its throwing the error that the device is in use already.
    Please clarify the error and confirm that there is no errors issues from your FMLE side. We have installed the latest downloadable (stable version) from Osprey Viewcast  website only.
    Regards
    Vibs

    I have solved the error by installing Desktop Experience Feature in Windows 2008
    To resolve this problem, install the Desktop Experience feature of Windows Server 2008. To do this, follow these steps: 
    Click Start, click Administrative Tools, and then double-click Server Manager. 
    In Server Manager, click Add Features under Features Summary. 
    In the Add Features Wizard dialog box, make sure that the Desktop Experience option is selected. 
    Click Next, and then click Install. 
    After the installation process is complete, click Close, and then close Server Manager.
    Note After you install Desktop Experience, you have to restart the computer.

  • How do I remove Lotus Notes PDFMaker plugin via command line?

    How do I remove the lotus notes PDFMaker plugin via command line?  I originally deployed Adobe Acrobat 10 as a complete install to many computers.  I see how to remove this specific feature through the GUI in Windows 7 by going to control panel / programs and features / Adobe Acrobat X / change / modify / create adobe PDF / acrobat PDFMaker / Lotus Notes, but this would be a tedious task to do manually at each computer.  I've experimented with a few msiexec commands after removing Acrobat such as:
    msiexec /i "\\path to msi" remove=pdfmakerforlotusnotes
    msiexec /i "\\path to msi" disable_pdfmaker=yes
    Both still install acrobat as a complete install.  Any help and suggestions would be appreciated.  Thank you!

    Thank you Sabian, that did the trick.  Here is the command line I used for anyone else having a similar issue:
    msiexec /i "\\path to msi" REMOVE=PDFMakerForLotusNotes /qn
    I did this on a test machine with a complete Acrobat installed.  I ran the above command and it removed the Lotus Notes PDFMaker plugin.  I should also note that it didn't downgrade my version of Acrobat and all of my custom settings within the application are still there.

  • Create users via the CLI interface on a SX20

    Hi 
    Are there some who know how to create users via the CLI interface on a SX20. You can do this via the web interface but I have many video installations where I need to create a user account. Therefore, it would be easiest if I can make it through the CLI interface. 
    Best regards 
    Jesper

    Unless there's a very well hidden command somewhere, then no. As far as I know, this can only be done for the remote supportuser account;
    xcommand UserManagement ?
    xCommand UserManagement RemoteSupportUser Create
        ExpiryDays: <1..31>
    xCommand UserManagement RemoteSupportUser Delete
    xCommand UserManagement RemoteSupportUser DisablePermanently
        Confirm(r): <Yes>
    xCommand UserManagement RemoteSupportUser GetState
    /jens
    Please rate replies and mark question(s) as "answered" if applicable.

  • Add protocol args with quotes via command-line

    I am creating a small script to insert objects into the SGD databases (ENS) via command-line and perl. I have some difficulties with protocol-arguments which require quotes (").
    For example:
    /opt/tarantella/bin/tarantella object new_windowsapp --name "o=applications/cn=new_winapp" --width 600 --height 800 --protoargs "<protocol-arguments>"
    The problem comes when I need to add multiple protocol-arguments with quotes like: -dir "c:\Program Files\Application Directory"
    Can someone tell me how to add those arguments including the quotes?
    Thanks,
    Remold Krol | Everett

    Try to use the single quote ( ' )
    say, for instance
    protoargs 'dir "c:\Program Files\Application Directory" '
    That works for me.
    Regards.

  • Submit --Title via command line.

    So I'm submitting files via command line. All is working well but I need to set the Title and description on the fly from a script. so I'm attempting to use the --title and --description options. But the submission fails when I do. Anybody out there make this work on 10.6.4? Example below.
    podcast -s my.server.com -u user -p password --submit --file /path/to/file --workflow "Workflowname" --title "my new podcast --description "This is the Description"

    Well that's a start
    Looking at man podcast, there is not any '--title' or '--description' options on the command line, which could explain why they don't work
    It looks like podcast expects this data to be passed in via a metadata .plist file.
    Here's the example from man podcast:
    podcast --server myserver.example.com --user username --pass password
    --submit --file /path/to/file --workflow 'Workflow1' --metadata
    /path/to/metadata.plist
    where the file /path/to/metadata.plist should look something like (again, taken from man podcast:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
      <dict>
        <key>Author</key>
        <string>Professor Rick Hathaway</string>
        <key>Comment</key>
        <string>Strangely, things fall together. Sorry Yeats.</string>
        <key>Copyright</key>
        <string>Copyright (c) 2007 Vox Clamantis College</string>
        <key>Description</key>
        <string>Gravitation is a phenomenon through which all objects attract each other.</string>
        <key>Keywords</key>
        <string>gravitation phys13</string>
        <key>Title</key>
        <string>Lecture 4 -- The theory of gravitation</string>
      </dict>
    </plist>

  • Assessing Command 'Analyze Source Files' via Command Line when running TestSTand Deployment Utility

    Our Software Configuration Manager is running the TestStand Command Line Deployment Build Tool (Ref: https://decibel.ni.com/content/docs/DOC-38947).
            When he builds the application,  the code will not be at the same location it was in development. 
    If you are Manually running the TestStand Deployment Utility, This is not a problem because everything is relative in the workspace.   Simply go to the Distributed Files Tab (of TestSTand Deployment Utility) and hit the, "Analyze Source Files" button.  This finds the required files and apparently creates an updated hard path to be used during the build (probably in the *.tsd).
    PROBLEM:  We auto-run the Command Line Deployment Build Tool (Command Line), and we do not have access to the, 'Analyze Source Files' command.
                As a result, our build consist of many warnings and the output is missing many files (the location of the files have not been updated).
    If we could access the 'Analyze Source Files' Command via command line, that would fix the issue. 
    FYI:  We use an automatic builder called Quick Build as our builder.
    Attachments:
    TestSTand Deployment Utility-Distributed Files Tab.PNG ‏76 KB

    Unfortunately it looks like Analyze Source Files does not have a command equivalent for the command line based on this article and attached PDF:
    https://decibel.ni.com/content/docs/DOC-38947
    That may be a good post for the TestStand Idea Exchange for consideration in future versions of TestStand.
    Michael K.

Maybe you are looking for

  • Where do I need to fix this?

    The assignment was: Create a non-GUI based Java application that calculates weekly pay for an employee. The application should display text that requests the user input the name of the employee, the hourly rate, and the number of hours worked for tha

  • Help with saving my itunes attributes

    Ok. i resecntly got a fifth gen ipod, and i love it. The itunes is great. User friendly and i can customize everything. i love it. but i do have 1 concern that needs an answer. i'm running a computer that was pretty much a mailorder pc taht started o

  • Conditions not  appearing  in  condition table in PO.

    Dear experts PO  was created, later  edited  and  in  conditions  custom clearing  charges were selected  from  possible  entries and entered. Another PO  was created and  saved  but  later edited and  in conditions custom clearing charges were to be

  • AT SELECTION-SCREEN ON VALUE-REQUEST FOR D

    I have four Select options A,B,C,D For A value is entered For B value is entered For C value is entered For D , i need to create a custom search help.i will develop that in the event AT SELECTION-SCREEN ON VALUE-REQUEST FOR D.while generating the sea

  • Green highlight box appearing on the quiz submit button

    Hi all, There is an unusual green highlight box appearing on my quiz slide when I roll my mouse over the 'submit' button (on the published version). This has never happened before, please help! Screenshot below Thanks for your help. Waterbottle1