Command line user authentication

I'm probably missing something obvious, but can't find it in the command line manual or via google...
What can I use on the command line to just test a username & password against OD?
I can find the user using ldapsearch and see the encrypted password, and I can login to dscl as the user, but is there a built in
xxxxx username password -> success or failure
command?
Many thanks in advance.
John

Hi
chkpasswd
Open Directory is the default system that you can test a user and password. Consult the manual for proper usage.
Hope this helps, Tony

Similar Messages

  • File name as command line option for multiple VM processes

    "-Xloggc:/tmp/gc.log" is the option I'd like to set, but every process will log to that file and even if we don't experience any concurrency issues the data still isn't useful because I can't tell which process did what.
    The island files are cleverly named to include their process number, can I do similar for command line options or will I be restricted to a single JVM?

    Online help (as of LabVIEW 7.0?), Index, Command Line, User-defined arguments - It will show you the following:
    You also can pass LabVIEW-defined or user-defined arguments when you launch LabVIEW from the command line. To pass user-defined arguments in the command line, enter two hyphens (--) surrounded by spaces before the set of user-defined arguments. LabVIEW does not use any arguments after the two hyphens to launch labview.exe. LabVIEW passes the arguments after the two hyphens to the block diagram of the VI you launch. Use the Application:Command Line Arguments property to read the user-defined command-line arguments passed when LabVIEW launches.
    For example, to launch mycool.vi and pass user-defined arguments, use the following command:
    c:\labview\la
    bview.exe c:\coolapp\mycool.vi -- 1000 sine
    On the block diagram of the mycool.vi, use the Application:Command Line Arguments property to read the 1000 and sine arguments you passed and handle the values.
    Enjoy,
    Roy

  • Command line editing -- move quickly

    Macintosh-HD -> Applications -> Utilities -> Terminal
    I'm running bash.
    I have a long command line:
    /Users/mac/Sites/bithoist/BitHoist-PPC-MacOS-X   -offset 0x0000  /Users/mac/Sites/bithoist/commandLine/bins/aSunbird.bin   -stdout -hex   -r 0x0000,0x002f
    I'd like to move quickly to the last 0 in -offset 0x0000.
    I know about control + a and I found out about esc + f.  I do not find pressing esc then f then esc then f that easy.  I'd like to at least be able to hold down the esc key and press f's.
    Can I configure something? 
    Could I redefine a word to only be " " (space) in the terminal?  Not sure I like this idea.
    Would be nice to user the mouse.
    Robert

    You could switch to vi style command line editing.
    shopt -s -o vi  # can be put in your .bash_profile (or .bash_login (or .profile))
    but then you need to hit <ESC> to get into vi command mode, but once in command vi command mode, you can use 'e' to quickly move to the end of the next work.  Hitting the key repeatedly will quickly get you to the end of 0x0000
    But now you need to hit 'i' to get back into insert mode.
    I do realize that vi mode is not without its annoyances.
    You can also remap the emacs key bindings using the bash 'bind' command.
    bind '"\C-f"':forward-word  # which would find control-f to forward-word
    which might be easier than escape-f
    The following is from "man readline":
       VI Mode bindings
                 VI Insert Mode functions
                 "C-D"  vi-eof-maybe
                 "C-H"  backward-delete-char
                 "C-I"  complete
                 "C-J"  accept-line
                 "C-M"  accept-line
                 "C-R"  reverse-search-history
                 "C-S"  forward-search-history
                 "C-T"  transpose-chars
                 "C-U"  unix-line-discard
                 "C-V"  quoted-insert
                 "C-W"  unix-word-rubout
                 "C-Y"  yank
                 "C-["  vi-movement-mode
                 "C-_"  undo
                 " " to "~"  self-insert
                 "C-?"  backward-delete-char
                 VI Command Mode functions
                 "C-D"  vi-eof-maybe
                 "C-E"  emacs-editing-mode
                 "C-G"  abort
                 "C-H"  backward-char
                 "C-J"  accept-line
                 "C-K"  kill-line
                 "C-L"  clear-screen
                 "C-M"  accept-line
                 "C-N"  next-history
                 "C-P"  previous-history
                 "C-Q"  quoted-insert
                 "C-R"  reverse-search-history
                 "C-S"  forward-search-history
                 "C-T"  transpose-chars
                 "C-U"  unix-line-discard
                 "C-V"  quoted-insert
                 "C-W"  unix-word-rubout
                 "C-Y"  yank
                 "C-_"  vi-undo
                 " "  forward-char
                 "#"  insert-comment
                 "$"  end-of-line
                 "%"  vi-match
                 "&"  vi-tilde-expand
                 "*"  vi-complete
                 "+"  next-history
                 ","  vi-char-search
                 "-"  previous-history
                 "."  vi-redo
                 "/"  vi-search
                 "0"  beginning-of-line
                 "1" to "9"  vi-arg-digit
                 ";"  vi-char-search
                 "="  vi-complete
                 "?"  vi-search
                 "A"  vi-append-eol
                 "B"  vi-prev-word
                 "C"  vi-change-to
                 "D"  vi-delete-to
                 "E"  vi-end-word
                 "F"  vi-char-search
                 "G"  vi-fetch-history
                 "I"  vi-insert-beg
                 "N"  vi-search-again
                 "P"  vi-put
                 "R"  vi-replace
                 "S"  vi-subst
                 "T"  vi-char-search
                 "U"  revert-line
                 "W"  vi-next-word
                 "X"  backward-delete-char
                 "Y"  vi-yank-to
                 "\"  vi-complete
                 "^"  vi-first-print
                 "_"  vi-yank-arg
                 "'"  vi-goto-mark
                 "a"  vi-append-mode
                 "b"  vi-prev-word
                 "c"  vi-change-to
                 "d"  vi-delete-to
                 "e"  vi-end-word
                 "f"  vi-char-search
                 "h"  backward-char
                 "i"  vi-insertion-mode
                 "j"  next-history
                 "k"  prev-history
                 "l"  forward-char
                 "m"  vi-set-mark
                 "n"  vi-search-again
                 "p"  vi-put
                 "r"  vi-change-char
                 "s"  vi-subst
                 "t"  vi-char-search
                 "u"  vi-undo
                 "w"  vi-next-word
                 "x"  vi-delete
                 "y"  vi-yank-to
                 "|"  vi-column
                 "~"  vi-change-case

  • How to login in command line by adding user/password in the same line

    is it possible in OSX to login in terminal by typing:
    +login username password+
    I tried many unix command and never find a command that can do that in one line, it always ask for the password in the second line.
    I need that to be used in Python application,
    or if there any possibility to write code in python to do that in OSX using python osx modules,
    while in windows it worked perfect by using win32API in Python.
    I hope Apple developers can help me with That
    Thanks

    This isn't possible because it would be a terrible security vulnerability--any process on the system can see a program's command line arguments. (Just type "perl -e 'sleep 5' & ps" in a terminal if you don't believe me.) If you want to log in like this, you'll have to open the "login" program in such a way that you can give it the password through its standard input.
    Also note, however, that "login" will not change the account your Python program is running as; it just starts a shell running as that account. If you want your program to run as a different user, you need to look into a set of commands and techniques called "setuid" or just "suid"; a Google search for "setuid python" should get you started. (I'm not a Python programmer, so I can't really tell you exactly how setuid works in Python.)

  • Using Unix Command Line to force logoff of other users

    Hello - I am the administrator for my family's Mac (OS X - 10.4.8). Four of us in the family share the system. Frequently, my family members forget to logoff. I would like to be able to force them off via the Unix command line. Can't I sign on as root and execute a "forced logoff" type of command?

    Thanks to Mihalis and Jarik for the additional info.
    I'm back now with a question. I have a user named "visitor" logged on. I issued a killall command which killed all the users processes except one. Using /Applications/Activity Monitor.app, I can see the process is "loginwindow" and it is owned by visitor.
    However,
    ps -u visitor
    reveals no running processes. Assuming I only had command-line access (no GUI to use Activity Monitor.app) and had multiple users logged in, how can I discover which loginwindow PID belongs to visitor?
    msq
    EDIT: I went ahead and sudo kill PID the loginwindow process owned by visitor and realized that
    ps -axj | grep visitor
    worked to reveal the loginwindow process owned by visitor. But when I logged visitor in (Fast User Switching) and ran sudo killall the Activity Monitor.app identifies the loginwindow as being owned by root but ps -axj | grep visitor shows the process belonging to visitor.
    Something weird in the depths of Leopard's UNIX land, but I think I can find my way around now.
    Thanks, everyone.
    Message was edited by: mistersquid

  • How to create a new user and group on command line?

    Hi,
    I am trying to install INN, the news server on OS X.4.8 (non-server), but it requires me to create a user and group, both called 'news'.
    I know this has something to do with using Netinfo to create them, but I am logged in remotely via ssh and I can't use Netinfo Manager.
    How do I create new users and groups via the command line.
    Thanks for any help.
    PowerMac G5 2x2.7GHz   Mac OS X (10.4.8)  

    I've put some shell scripts that do this here,
    and descriptions
    add_user
    addgroup

  • How to assign the default service package to the user in the command line ?

    when i create use use the following command ,which service package is assigned to the user ,or in where can i set the default service package ,thanks for you!
    /opt/SUNWcomm/bin/commadmin user create -D admin -F John -l jdoe -L Doe -n jnpc.com.cn -p 80 -w admin123 -W demo -X v120e.jnpc.com.cn -S mail,cal -E [email protected] -H v120e.jnpc.com.cn -k legacy

    When I create a user via command-line, I get no service package. I don't see any way to assign such on creation via command-line.
    Some of what might be in a service package can be set as default falues, through configutil.
    quota is this kind of thing.

  • Create Users with Mail enabled in dscl or command line

    I have figured out how to use the dscl to add a user.
    example:
    $ sudo dscl . create /users/rothman uid 701
    $ sudo dscl . create /users/rothman gid 20
    $ sudo dscl . create /users/rothman realname "Ernest Rothman"
    $ sudo dscl . create /users/rothman passwd \*
    I went as far as to launch WorkGroup manager to enable Mail.
    The following gave me the key values:
    dscl . read /Users/test MailAttribute > mailsettings.txt
    When I try to replace from the txt file. WorkGroup Manager than believes the Mail is not enabled.
    How do I use dscl or a terminal command to enable the user with mail server and to use IMAP Only?
    I do not want to always have to remotely connect to launch Workgroup Manager to enable mail for new users.
    I hope you can help for I am new dscl or even NetInfo command line tools.
    I have tried these, but I guess it does't like how it is being restored into that property.
    dscl . create /Users/test MailAttribute `< mailsettings.txt`
    <?xml version="1.0" encoding="UTF-8"?>
    <dict>
    <key>kAPOPRequired</key>
    <string>APOPNotRequired</string>
    <key>kAltMailStoreLoc</key>
    <string></string>
    <key>kAttributeVersion</key>
    <string>Apple Mail 1.0</string>
    <key>kAutoForwardValue</key>
    <string></string>
    <key>kIMAPLoginState</key>
    <string>IMAPAllowed</string>
    <key>kMailAccountLocation</key>
    <string>192.168.181.132</string>
    <key>kMailAccountState</key>
    <string>Enabled</string>
    <key>kPOP3LoginState</key>
    <string>POP3Deny</string>
    <key>kUserDiskQuota</key>
    <string>0</string>
    </dict>
    I have also tried appending by doing something like this.
    dscl . create /Users/test MailAttribute '<?xml version="1.0" encoding="UTF-8"?>’
    dscl . append /Users/test MailAttribute ‘<dict>’
    dscl . append /Users/test MailAttribute ‘<key>kAPOPRequired</key>’
    dscl . append /Users/test MailAttribute ‘<string>APOPNotRequired</string>’
    dscl . append /Users/test MailAttribute ‘<key>kAltMailStoreLoc</key>’
    dscl . append /Users/test MailAttribute ‘<string></string>’
    dscl . append /Users/test MailAttribute ‘<key>kAttributeVersion</key>’
    dscl . append /Users/test MailAttribute ‘<string>Apple Mail 1.0</string>’
    dscl . append /Users/test MailAttribute ‘<key>kAutoForwardValue</key>’
    dscl . append /Users/test MailAttribute ‘<string></string>’
    dscl . append /Users/test MailAttribute ‘<key>kIMAPLoginState</key>’
    dscl . append /Users/test MailAttribute ‘<string>IMAPAllowed</string>’
    dscl . append /Users/test MailAttribute ‘<key>kMailAccountLocation</key>’
    dscl . append /Users/test MailAttribute ‘<string>192.168.181.132</string>’
    dscl . append /Users/test MailAttribute ‘<key>kMailAccountState</key>’
    dscl . append /Users/test MailAttribute ‘<string>Enabled</string>’
    dscl . append /Users/test MailAttribute ‘<key>kPOP3LoginState</key>’
    dscl . append /Users/test MailAttribute ‘<string>POP3Deny</string>’
    dscl . append /Users/test MailAttribute ‘<key>kUserDiskQuota</key>’
    dscl . append /Users/test MailAttribute ‘<string>0</string>’
    dscl . append /Users/test MailAttribute ‘</dict>’

    Got it to take as a single statement.
    dscl . create /users/test applemail "<?xml version='1.0' encoding='UTF-8'?> <dict> <key>kAPOPRequired</key> <string>APOPNotRequired</string> <key>kAltMailStoreLoc</key> <string></string> <key>kAttributeVersion</key> <string>Apple Mail 1.0</string> <key>kAutoForwardValue</key> <string></string> <key>kIMAPLoginState</key> <string>IMAPAllowed</string> <key>kMailAccountLocation</key> <string>192.168.181.132</string> <key>kMailAccountState</key> <string>Enabled</string> <key>kPOP3LoginState</key> <string>POP3Deny</string> <key>kUserDiskQuota</key> <string>0</string> </dict>"
    Doing the above showed in WorkGroup manager and I tested and the user received a email, so now I can automate adding users without needing the GUI. *Just to note you still have to setup mail services and your virtual, aliases files for postfix. This is just so the user is opened up to be allowed to receive email in the first place.
    I still could not seem to pipe a file into dscl command even though the file was a single line of text. I had planned to embed this in a single command so no big deal.

  • Export and Import User Command Line

    Hi,
    I would like to export a user on my Xserver via command line. I know it's the nidump command but not sure how to use it for a proper export. After the export I want to import that user on a second macosx server with niload or whatever command is needed.
    Please can somebody post some examples for me.
    Thanks heaps,
    Christian

    I would like to export a user on my Xserver via
    command line. I know it's the nidump command but not
    sure how to use it for a proper export. After the
    export I want to import that user on a second macosx
    server with niload or whatever command is needed.
    To export all users on the old server:
    sudo nidump passwd . > myExportFile
    Then open the file with TextEdit (or the like) and clear out all the users you do not want to import. Then copy the file to your new server and do:
    sudo niload passwd . < myExportFile
    Note: this only works with local NetInfo users, not LDAP ones.<br>
    MacBook Pro   Mac OS X (10.4.6)  

  • Backup user account with command line

    I am trying to set up a command line script (bash alias, actually) that will let me backup my entire user account to an externa firewire. Right now I am using
    rsync -a -u --delete --stats /Users/me /Volumes/FW_Backup/me/
    but I get about 500 meg less data at the destination as I have at the source and I get a command line response saying that some files could not be copies for permissions reasons.
    Would it fix things to run this command under Sudo or is there a better way to be sure I have a complete clone of my user account syncronized whenever the command is run (I am aware that there are multiple GUI resolutions to this but prefer to use the free native tools so I can roll it out to multiple Macs).

    I did try that but if I recall properly you wind up with other permissions problems - in the case of root not having permissions to the user. So I simply excluded the troublesome paths:
    code
    rsync -a -u --exclude Library/Caches/ --exclude Library/Preferences/ --delete --stats /Users/Richard /Volumes/rich_backup/
    And that has worked, but now I have a new problem: if the network share is not mounted, rsync will simply create the directory /volumes/rich_backup on the hard disk and rsync to it! This is a obviously a problem should I or other users forget to mount the network share intended for backup. So I need to figure out how to get the command to error out if the network share is not present. I tried to begin the script with
    code
    ls /volumes/rich_backup &&
    in order to get it to error out if the share was not present and it worked on my Tiger system, but on a customer's Panther system the script does not error out! Can anyone help me with some code that will intentially break my backup script if the destination volume is nor present?
    Dual 2.7 PowerMac Mac OS X (10.4.2)

  • Passing user defined parameters in oracle reports thru command line

    Hi All
    We are currently using Reports 6i with Oracle 10g 10.2.0.4.0
    I would like to know that is it possible to pass user defined parameters values while calling report from command line.
    For Example: I am using following coding to call report from command line.
    for /f "tokens=1-3 delims=/ " %%a in ('date /t mm/dd/yyyy -1') do (
    set mm=%%b
    set dd=%%a
    set yyyy=%%c)
    rwrun60 report=c:\reports\banks.rdf userid=express/test@test_rs2 destype=FILE desname=c:\reports\banks%dd%%mm%%yyyy%.pdf desformat=PDF BACKGROUND=NO BATCH=YES
    The report contains some user defined parameter which is using in where condition of reqport query.
    Select * from banks
    where id = :Bank_ID
    Now I want to Pass value for :Bank_Id from command line (like we pass parameter list while calling report with run_product), how it is possible?
    Thanks
    Hassan

    Hi guys
    Fortunately I am able to perform the required task as I just added the report parameter field as follows:
    rwrun60 report=c:\reports\banks.rdf userid=express/test@test_rs2 destype=FILE desname=c:\reports\banks%dd%%mm%%yyyy%%h%%mi%%ss%%ts%.pdf desformat=PDF BACKGROUND=NO BATCH=YES ERRFILE=c:\reports\error.log LOGFILE=c:\reports\joblog.log bank_id='MCB'
    bank_id is the report parameter using in where clause.
    Regards,
    Hassan

  • Command line for end users

    Hy guys, in order to run the command line below:
    C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTEXEC.EXE /F
    "G:\SHAREDFOLDER\PIPPO.DTSX"
    Does the user need to have BIDS installed in the local machine?
    My goal is to allow end user to run packages saved in the network shared folders.
    Many Thanks

    Hi DIEGOCTN,
    The SQL Server Data Tools option installs the Integration Services components required to design a package, but the Integration Services service is not installed and you cannot run packages outside of Business Intelligence Development Studio. If we just
    want to run packages outside the design environment, we needn’t install Business Intelligence Development Studio, but we must select Integration Services on the Feature Selection page to install Integration Services.
    The following two articles for your references:
    http://msdn.microsoft.com/en-us/library/ms143731.aspx
    http://stackoverflow.com/questions/14551255/how-do-i-enable-integration-services-ssis-in-sql-server-2008
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Command line authentication "/ap" is not working on the Mac

    I am trying to connect to my media server using the Mac version of FMLE, but my server has authentication and I cannot connect to it using the command line. I use the /ap command line option with the username:password string, it works on Windows, but not on the Mac.
    Do anyone else have this problem? If someone made it work somehow using command line authentication, could you please tell me how you made it work? Thank you.

    It's working for me.
    Are you using the right credentials? What's the error fmle gives?

  • Command Line Expert Needed: Deleted hostconfig (+ others) - boots to single user mode only !

    Mac OS X Tiger 10.4.11
    Deleted folders/files when logged in as root user. (don't ask!)
    On restart , wont boot up , get grey screen with white apple logo the black screen with command line: localhost:/ root#
    Started up from install cd - repaired permissions (ran twice) &amp; verified hard drive . All okay.
    Restarted but still goes back into command line with same localhost:/ root prompt
    Tried a bunch of different things as per advice on these boards - discovered that there is no hostconfig file.
    Restarted into verbose mode.
    Here are the lines that i think may reveal exactly what I messed up - and hopefully someone out there has an idea how I can try to fix without having to do an archive/install.
    BSM auditing present
    disabled
    rooting via boot-uuid from /chosen: (here a very long string of numbers and letters looks like a password)
    Then a long line about
    "got boot device = IOService:/MacRISC2PE ........."
    Then, the following
    "BSD root: disk0s3, major 14, minor 2"
    "CSRHIDTransitionDriver::stop"
    "IOBluetoothHCIController::start Idle Time Stopped"
    (AND HERE'S THE BIGGIE:)
    /etc/rc: line 93: /etc/hostconfig: No such file or directory
    Apr  1. 06:01:44 launched: /bin/sh on /etc/rc terminated abnormally, going into single user mode
    localhost:/ root#
    I'm pretty sure I messed thing up pretty well - was mainly network/server folders and files - definitely samba, which I think I deleted, and under "network" in the finder, I also might have deleted my computer from the server list
    As an aside in case this provides any insight, when I go to the terminal app when starting up from install cd, the prompt reads :
    "bash-2.05b"
    I'm also able to see the contents of my hard drive when using disk utility from install cd and and trying to "mount image" ---
    Everything looks intact in terms of folders/files in my user account, but in the /root folder, there's only /library - which is empty.
    Any help, insight, troubleshooting and even scolding - will be welcome! I need this thing booted
    Cheers

    I do not have a backup. Should I back up before I try doing a reinstall of the os x?
    That's also known as shutting the barn door after the horse has bolted.
    It can't hurt, but it's not going to help much.
    Camelot: when you say "apps and user content should stay intact" - doesn't sound very definitive. Are there any variables that come into play?
    No.. generally it's pretty reliable, but yours is an odd situation. I wouldn't expect to lose any user data, just CYA
    I do have a start up disk along with some apps that I created in retrospect many years ago ....(I think it's os x 10.2.8) Can I use this to boot up and then just navigate to my user files so I can get some things done that I need to?
    Unlikely. For one have you even tried restoring from your Retrospect backup? (it's not the most reliable system).
    Secondly, you can't boot from your Retrospect backup, so you'll need to restore that system to boot from it. Have you got a second disk to restore to (you do NOT want to restore 10.2.x over your 10.4.x system).
    in terms of "random deleted files" : not entirely random
    Ok, maybe not entire random, but it's also somewhat unknown. You need to have some idea of what files you're trying to restore, but if you haven't got them in a backup where are you going to get them from?
    You cannot just take old copies from your 10.2.x system and hope they'll work (in case that's what you're thinking).
    The BEST solution is to boot from the 10.4.x installer disk and let it do its thing.
    And for what its worth, Unauthorized access attempts, in and of themselves, are not a cause for concern since they were clearly caught by the OS. It's the access attempts that succeed (and are not logged) which are more of an issue.

  • Command Lines in the User Edition, Discovere 4i

    Dear All,
    I am searching for an answer regarding the chance to use the batch command line in the Discoverer 4i user edition to export an xls file with the pivot format.
    It is not possible to do this in the previous version, but it's possible in the 4i version choosing the xls pivot format while exporting the report interactively.
    So we are looking for a specific parameter to be used in the command line.
    Thank you for your help,
    Carola Buora

    Hi Carola,
    May I suggest reposting this question to the Dicoverer forum
    http://forums.oracle.com/forums/forum.jsp?id=422740
    Your chances for getting the right set of answers are probably much better there. Hope this helps.
    Cheers,
    -lars

Maybe you are looking for

  • AD security group as FIM Portal administrator

    Hi Gurus i have a question. I want to add an AD Security group in FIM for the users of the group to be the FIM portal administrator. I believe to do that I need to sync the group using a management agent, and then add that group to the Sharepoint adm

  • Discoverer view change default option

    Hi friends, when connecting to discoverer/plus or viewer. The first screen, we will see "Connect to" and the default for this one is "OracleBI Discoverer" I just wonder if i can hide that option. So anytime when i open discoverer plus it i should not

  • Change Created By in process - Create Xellerate User from GTC

    Hello, I configured a GTC recon rule to create new OIM user (xellerate user). The rule is worked, new OIM user has created. I have access policy that auto provisoned AD resource for this new user. The rule is also worked good. Now, I like to change t

  • Re: Binary to Decimal

    Kamran, You fill BinaryData with string representation of integer, while you need to use pointer to integer instead. Try this: SIZEOF_LONG: integer = 4; bdata : BinaryData = new; val: ui4 = 5000; pcode: pointer to ui4 = &val; bdata.SetValue(pcode, SI

  • HE 6 security settings with HFM 11?

    Hi All, I wanted to know if the security extract from an HE 6.4.1.1 system is compatible as-is to be loaded into HFM 11.1.2 using the "Load Application Security" function. I see this statement in the Admin Guide "Caution! You can only load security c