ARD UNIX Commands (create user)

Looking for a good resource for ARD Unix commands.. have lots of projects trying to do through ard..
first is create a new user so I can do it across many machines..
Thanks.

In addition to the sources Templeton mentioned, a good book on UNIX for Mac OS X (such as the O'Reilly books) would be useful. You can send through ARD many of the UNIX commands that Mac OS X recognizes, though of course you have to be careful what you send or you can cause yourself lots of problems.

Similar Messages

  • ARD Unix Command install with root

    I'm a bit of a unix novice, I am trying to install a script file, 'install.sh', via ARD. Works fine in Terminal locally but I can't work out how to input the root password via the ARD unix command tool.
    cd Desktop
    chmod +x install.sh
    ./install.sh -i
    & set to run command as Root.
    I'm getting seemingly nonsense errors e.g. 'Error 127 sh: line 1: cd: Desktop: No such File or Directory' when the file is definitely there, on the desktop.
    I'm pretty sure it needs to enter the root pw in the code window, can anyone advise please?

    when you say install.sh is on the desktop of the remote computer. Is that the desktop for account root? Or is that the desktop of the current logged in users? (assuming the currently logged in user is not root)
    when you run a command as root you start at "/var/root/" there is only going to be a folder /var/root/desktop/, if you've used the login window at least ones to log into root.
    if the current user logged into the remote computer is another account, then your install.sh resides in another location. Witch will look some thing like this. /Users/nameOfUser/Desktop/install.sh
    try this. Send the command:
    cd Desktop
    pwd
    send the command first as the current logged in user, then as root. When you run it the first time, you should get some thing like  /Users/nameOfUser/Desktop/
    when you run it as root you'll probable see /var/root/.
    if you do then you would probable want to do some thing like
    chmod +x /Users/nameOfUser/Desktop/install.sh
    /Users/nameOfUser/Desktop/install.sh -i

  • ARD-Unix Command for Energy Saver Settings

    I need to take out the schedule for turning on and off 100 + iMacs. The setup was done with managed preferences in OSX server but cannot be taken off now. Is there a way to turn this off using a unix command with ARD? I've been doing one by one with ARD!

    Use ARD to send the Unix command systemsetup -help
    This will return a bunch of different commands for you to look at that are related to power and energy saving settings. Make sure you send the command as the root user
    You can always read the man files for the pmset command using your Terminal app. Also check out this page too:
    http://www.hmug.org/man/1/pmset.php

  • Networksetup ARD Unix command - Joining AirPort loop

    Hi,
    I'm attempting to mass-set a bunch of iBooks to join a specific AirPort network with a WEP key.
    My understanding is with ARD, I can run the following unix command en masse:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setairportnetwork "myAirport" "aaaaa"
    Which returns: You cannot join a network when AirPort power is off.
    So I try to power on the AirPort:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setairportpower on
    Which Returns: You cannot set AirPort power because all AirPort network services are disabled.
    So I check to see what's actually enabled:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -listallnetworkservices
    An asterisk (*) denotes that a network service is disabled.
    Built-in Ethernet
    AirPort
    *Internal Modem
    *Bluetooth
    *Built-in FireWire
    Built-in FireWire
    808:/ root#
    Seems like the airport is enabled. So, lets check it specifically:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -getNetworkServiceEnabled AirPort
    Enabled
    Next I disable the network service and check that it is truly disabled:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setNetworkServiceEnabled AirPort off
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -getNetworkServiceEnabled AirPort
    Disabled
    Then re-enable it and power up the AirPort:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setNetworkServiceEnabled AirPort on
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -getNetworkServiceEnabled AirPort
    Enabled
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setairportpower onYou cannot set AirPort power because all AirPort network services are disabled.
    Back to where we were.
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setairportnetwork "myAirport" "aaaaa"
    You cannot join a network when AirPort power is off.
    Any ideas? Basically I want to be able to set the airport and the wep en-mass via ARD. This seems like the logical place to accomplish it.
    Thanks!
    iBook G4 Mac OS X (10.4.7) ARD Client 3.1

    Hi
    I found this out a few weeks ago after trying for about 20-30 minutes or so. Won't be the first time manual pages were wrong or out-of-date, nor the last. Depending which OS you're running there are manual pages for utilities that don't exist any more. I remember ktrace disappearing in 10.5 yet the manual page was still available. Completely gone in 10.6.
    Tony

  • ARD: Unix commands wait forever

    Hello,
    I run a cluster of 30 iMacs. We've just updated them to Mountain Lion, and when trying to control them via ARD, all Unix commands (even hostname or echo a) show as "waiting" and never complete.
    All machines involved are running Mountain Lion (or Mountain Lion Server in the case of the ARD master machine) and ARD 3.6.2.
    Can you think of anything that might be causing this? Unix commands used to work instantly before the upgrade to Mountain Lion.
    Thanks,
    Louise

    In addition to the sources Templeton mentioned, a good book on UNIX for Mac OS X (such as the O'Reilly books) would be useful. You can send through ARD many of the UNIX commands that Mac OS X recognizes, though of course you have to be careful what you send or you can cause yourself lots of problems.

  • ARD unix command to rename partition

    I need to rename the backup partitions of a large amount of computers. I was wondering if there is a Unix command I could use to send through ARD

    diskutil renameVolume 'Macintosh HD' 'Renamed Volume'

  • Executing unix command / which user ?

    Hi,
    I'm trying to execute a mv command to rename a file before
    loading it. Full permission is given to file (chmod 777).
    I used an external process by writing the full command in COMMAND parameter.
    OWF does not perform the task with the following message
    'mv /u02/......' : not found
    How is unix server accessed ? Which user is OWF using to access files ?
    Thanks

    Hi,
    Did you ever learned about this?
    I'm trying to execute a bash script in Unix via Oracle Workflow. My goal is to make this bash script part of the workflow...
    Please, some one can help me?
    feel free to write me anytime to : [email protected]
    Thanks in advance...
    Jorge

  • ARD unix command templates

    Just wondering is there anyway to tidy up the unix template menu in ARD. I have made my own unix scripts for various things and am now left with a long list. Apples own builtin templates have sub menus, is there a way to do that.
    I tried editing the plist file for my own list but it just constantly break it.

    Just wondering could you point me to ARD's default plist if you know were it is, So i can see what way they designed the plist structure.
    Thanks for the response.

  • Umask is wrong running unix command as current console user?

    ARD3.1 Admin on intel mac, Clients all v 3.1 PPCs
    If I ssh to a remote machine or use ARD Unix command as the logged-in console user joeuser and enter 'touch /myfile' the permissions are
    -rw-r--r-- 1 joeuser admin 0 Apr 27 10:40 myfile
    but if i am directly on the machine and do it the result is
    -rw-rw-r-- 1 joeuser admin 0 Apr 27 10:42 myfile
    Is this expected behavior? How about the group membership? If I execute the same commands in ~/ the results are:
    -rw-r--r-- 1 joeuser av 0 Apr 27 10:40 myfile
    and again when i am directly on the machine and do it the result is
    -rw-rw-r-- 1 joeuser av 0 Apr 27 10:42 myfile
    where av is the group as defined in netinfo.
    the NSUmask value in /Library/Preferences/.GlobalPreferences.plist was set to integer 2 in all cases on the client machines.
    I'm new to this board, so my apologies if this question belongs in a different one.

    Please discard the above msg i got a solution by just adding file.delete
    thanx

  • Execute Unix command on login

    Hello, is it possible to execute a unix command on user login?
    I want that every time a user login on a mac at my company, a unix command be executed.
    Is this case, this is the command: defaults write com.apple.mail NSPreferredMailCharset "UTF-8"
    thks in advance

    {quote}Loginwindow Scripts
    Another way to run applications at login time is to launch them using a custom shell script. Mac OS X provides two options for launching scripts when the user logs in. When creating your script file, keep the following in mind:
    * The permissions for your script file should include execute privileges for the appropriate users.
    * Scripts launched by loginwindow are run as root. Therefore, you should thoroughly test your scripts before deploying them to make sure they do not adversely affect the user's system.
    *In your script, the variable $1 returns the short name of the user who is logging in.
    * Other login actions wait until your hook finishes executing. Therefore, have your script do what it needs to do quickly and then exit. {quote}
    I want the script to be run as the current user that does the login, and not as the root. I think that if its run as root, it changes nothing in the user. Does this root issue apllies to the Zerwas method?
    It depends on how Zerwas was thinking you'd implement it. If you added it to each user's login items, it should run as the user. If you create a startup item to run it, it will run as root. I'm assuming Zerwas was suggesting the former because there would be no point in wrapping the shell script in an AppleScript if you are going to turn it into a startup item.
    What you might be able to do - at least with the loginwindow script - would be to explicitly run the command as the user by making use of the fact that the user name is passed to the loginwindow script as $1. I've never used loginwindow scripts but it seems as though it should work.
    Another possibility would be to use a LaunchAgent. These are really intended to manage background processes, though, and it seems an unnecessary use of resources to load one which will only ever be run at startup.
    Can I ask why you wish to run the script every time a user logs in? Is the concern that the default will get set to something else and needs to be reset regularly?
    - cfr

  • Bulk Create Users from CSV: Error: "Put": "There is no such object on the server."?

    Hi,
    I'm using the below PowerShell script, by @hicannl which I found on the MS site, for bulk creating users from a CSV file.
    I've had to edit it a bit, adding some additional user fields, and removing others, and changing the sAMAccount name from first initial + lastname, to firstname.lastname. However now when I run it, I get an error saying:
    "[ERROR]     Oops, something went wrong: The following exception occurred while retrieving member "Put": "There is no such object on the server."
    The account is created in the default OU, with the correct firstname.lastname format, but then it seems to error at setting the "Set an ExtensionAttribute" section. However I can't see why!
    Any help would be appreciated!
    # ERROR REPORTING ALL
    Set-StrictMode -Version latest
    # LOAD ASSEMBLIES AND MODULES
    Try
    Import-Module ActiveDirectory -ErrorAction Stop
    Catch
    Write-Host "[ERROR]`t ActiveDirectory Module couldn't be loaded. Script will stop!"
    Exit 1
    #STATIC VARIABLES
    $path = Split-Path -parent $MyInvocation.MyCommand.Definition
    $newpath = $path + "\import_create_ad_users_test.csv"
    $log = $path + "\create_ad_users.log"
    $date = Get-Date
    $addn = (Get-ADDomain).DistinguishedName
    $dnsroot = (Get-ADDomain).DNSRoot
    $i = 1
    $server = "localserver.ourdomain.net"
    #START FUNCTIONS
    Function Start-Commands
    Create-Users
    Function Create-Users
    "Processing started (on " + $date + "): " | Out-File $log -append
    "--------------------------------------------" | Out-File $log -append
    Import-CSV $newpath | ForEach-Object {
    If (($_.Implement.ToLower()) -eq "yes")
    If (($_.GivenName -eq "") -Or ($_.LastName -eq ""))
    Write-Host "[ERROR]`t Please provide valid GivenName, LastName. Processing skipped for line $($i)`r`n"
    "[ERROR]`t Please provide valid GivenName, LastName. Processing skipped for line $($i)`r`n" | Out-File $log -append
    Else
    # Set the target OU
    $location = $_.TargetOU + ",$($addn)"
    # Set the Enabled and PasswordNeverExpires properties
    If (($_.Enabled.ToLower()) -eq "true") { $enabled = $True } Else { $enabled = $False }
    If (($_.PasswordNeverExpires.ToLower()) -eq "true") { $expires = $True } Else { $expires = $False }
    If (($_.ChangePasswordAtLogon.ToLower()) -eq "true") { $changepassword = $True } Else { $changepassword = $False }
    # A check for the country, because those were full names and need
    # to be land codes in order for AD to accept them. I used Netherlands
    # as example
    If($_.Country -eq "Netherlands")
    $_.Country = "NL"
    ElseIf ($_.Country -eq "Austria")
    $_.Country = "AT"
    ElseIf ($_.Country -eq "Australia")
    $_.Country = "AU"
    ElseIf ($_.Country -eq "United States")
    $_.Country = "US"
    ElseIf ($_.Country -eq "Germany")
    $_.Country = "DE"
    ElseIf ($_.Country -eq "Italy")
    $_.Country = "IT"
    Else
    $_.Country = ""
    # Replace dots / points (.) in names, because AD will error when a
    # name ends with a dot (and it looks cleaner as well)
    $replace = $_.Lastname.Replace(".","")
    $lastname = $replace
    # Create sAMAccountName according to this 'naming convention':
    # <FirstName>"."<LastName> for example
    # joe.bloggs
    $sam = $_.GivenName.ToLower() + "." + $lastname.ToLower()
    Try { $exists = Get-ADUser -LDAPFilter "(sAMAccountName=$sam)" -Server $server }
    Catch { }
    If(!$exists)
    # Set all variables according to the table names in the Excel
    # sheet / import CSV. The names can differ in every project, but
    # if the names change, make sure to change it below as well.
    $setpass = ConvertTo-SecureString -AsPlainText $_.Password -force
    Try
    Write-Host "[INFO]`t Creating user : $($sam)"
    "[INFO]`t Creating user : $($sam)" | Out-File $log -append
    New-ADUser $sam -GivenName $_.GivenName `
    -Surname $_.LastName -DisplayName ($_.LastName + ", " + $_.GivenName) `
    -StreetAddress $_.StreetAddress -City $_.City `
    -Country $_.Country -UserPrincipalName ($sam + "@" + $dnsroot) `
    -Company $_.Company -Department $_.Department `
    -Title $_.Title -AccountPassword $setpass `
    -PasswordNeverExpires $expires -Enabled $enabled `
    -ChangePasswordAtLogon $changepassword -server $server
    Write-Host "[INFO]`t Created new user : $($sam)"
    "[INFO]`t Created new user : $($sam)" | Out-File $log -append
    $dn = (Get-ADUser $sam).DistinguishedName
    # Set an ExtensionAttribute
    If ($_.ExtensionAttribute1 -ne "" -And $_.ExtensionAttribute1 -ne $Null)
    $ext = [ADSI]"LDAP://$dn"
    $ext.Put("extensionAttribute1", $_.ExtensionAttribute1)
    Try { $ext.SetInfo() }
    Catch { Write-Host "[ERROR]`t Couldn't set the Extension Attribute : $($_.Exception.Message)" }
    # Move the user to the OU ($location) you set above. If you don't
    # want to move the user(s) and just create them in the global Users
    # OU, comment the string below
    If ([adsi]::Exists("LDAP://$($location)"))
    Move-ADObject -Identity $dn -TargetPath $location
    Write-Host "[INFO]`t User $sam moved to target OU : $($location)"
    "[INFO]`t User $sam moved to target OU : $($location)" | Out-File $log -append
    Else
    Write-Host "[ERROR]`t Targeted OU couldn't be found. Newly created user wasn't moved!"
    "[ERROR]`t Targeted OU couldn't be found. Newly created user wasn't moved!" | Out-File $log -append
    # Rename the object to a good looking name (otherwise you see
    # the 'ugly' shortened sAMAccountNames as a name in AD. This
    # can't be set right away (as sAMAccountName) due to the 20
    # character restriction
    $newdn = (Get-ADUser $sam).DistinguishedName
    Rename-ADObject -Identity $newdn -NewName ($_.LastName + ", " + $_.GivenName)
    Write-Host "[INFO]`t Renamed $($sam) to $($_.GivenName) $($_.LastName)`r`n"
    "[INFO]`t Renamed $($sam) to $($_.GivenName) $($_.LastName)`r`n" | Out-File $log -append
    Catch
    Write-Host "[ERROR]`t Oops, something went wrong: $($_.Exception.Message)`r`n"
    Else
    Write-Host "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) already exists or returned an error!`r`n"
    "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) already exists or returned an error!" | Out-File $log -append
    Else
    Write-Host "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) will be skipped for processing!`r`n"
    "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) will be skipped for processing!" | Out-File $log -append
    $i++
    "--------------------------------------------" + "`r`n" | Out-File $log -append
    Write-Host "STARTED SCRIPT`r`n"
    Start-Commands
    Write-Host "STOPPED SCRIPT"

    Here is one I have used.  It can be easily updated to accommodate many needs.
    function New-RandomPassword{
    $pwdlength = 10
    $bytes = [byte[]][byte]1
    $pwd=[string]""
    $rng=New-Object System.Security.Cryptography.RNGCryptoServiceProvider
    while (!(($PWD -cmatch "[a-z]") -and ($PWD -cmatch "[A-Z]") -and ($PWD -match "[0-9]"))){
    $pwd=""
    for($i=1;$i -le $pwdlength;$i++){
    $rng.getbytes($bytes)
    $rnd = $bytes[0] -as [int]
    $int = ($rnd % 74) + 48
    $chr = $int -as [char]
    $pwd = $pwd + $chr
    $pwd
    function AddUser{
    Param(
    [Parameter(Mandatory=$true)]
    [object]$user
    $pwd=New-RandomPassword
    $random=Get-Random -minimum 100 -maximum 999
    $surname="$($user.Lastname)$random"
    $samaccountname="$($_.Firstname.Substring(0,1))$surname"
    $userprops=@{
    Name=$samaccountname
    SamAccountName=$samaccountname
    UserPrincipalName=“$[email protected]”)
    GivenName=$user.Firstname
    Surname=$surname
    SamAccountName=$samaccountname
    AccountPassword=ConvertTo-SecureString $pwd -AsPlainText -force
    Path='OU=Test,DC=nagara,DC=ca'
    New-AdUser @userprops -Enabled:$true -PassThru | |
    Add-Member -MemberType NoteProperty -Name Password -Value $pwd -PassThru
    Import-CSV -Path c:\users\administrator\desktop\users.csv |
    ForEach-Object{
    AddUser $_
    } |
    Select SamAccountName, Firstname, Lastname, Password |
    Export-Csv \accountinformation.csv -NoTypeInformation
    ¯\_(ツ)_/¯

  • Unix Command run successfully through PL/SQL but showing no impact in UNIX.

    Hi,
    I am using Oracle 9i and Unix on my system and trying to execute a UNIX shell command through external procedure in C.
    I created a shared lib (libextproc.so) for the following function.
    int sysrun(char *command)
    return system(command);
    This function runs fine when caled through a driver function in C, meaning that the shared lib is fine.
    In PL/SQL, I have used the following method to invoke a UNIX command:-
    create or replace library shell_lib as '/home/ECETRAonsite/oracle/OraHome1/lib/libextproc.so';
    create or replace function sysrun (syscomm in varchar2)
    return binary_integer
    as language C
    name "sysrun"
    library shell_lib
    parameters(syscomm string);
    Now when I call this PL/SQL function to invoke the command, it is run succesfully but does not create the file.
    SQL>
    1 declare
    2 rc number;
    3 begin
    4 rc := sysrun('/bin/touch /home/ECETRAonsite/oracle/OraHome1/test/sach');
    5 dbms_output.put_line('Return Code='||rc);
    6* end;
    SQL> /
    Return Code=0
    PL/SQL procedure successfully completed.
    I have verified that the path for 'touch' is correct.
    Following are my configuration files.
    listener.ora
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST =172.21.161.69 )(PORT = 1521)(KEY = ECTPRF))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = extproc2)
    (ORACLE_HOME = /home/ECETRAonsite/oracle/OraHome1)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ANY")
    (SID_DESC =
    (SID_NAME = ECTPRF)
    (ORACLE_HOME = /home/ECETRAonsite/oracle/OraHome1)
    (ENVS = "EXTPROC_DLLS=ANY")
    tnsnames.ora
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = extproc2)
    Please suggest what is lacking for this to work properly.
    Thanks,

    No need to create a C wrapper for that kernel call. Simply call the kernel SYSTEM() call direct.
    The following works using 10.2.0.1 on HP-UX.
    SQL> create or replace library libc as 'libc.2';
    2 /
    Library created.
    SQL>
    SQL>
    SQL> create or replace function system( command IN string ) return binary_integer is
    2 EXTERNAL
    3 LIBRARY libc
    4 NAME "system"
    5 LANGUAGE C
    6 CALLING STANDARD C
    7 PARAMETERS (
    8 command STRING
    9 );
    10 /
    Function created.
    SQL> show errors
    No errors.
    SQL>
    SQL>
    SQL> -- remove the test file
    SQL> ! rm /tmp/plsql-test
    SQL>
    SQL> declare
    2 rc integer;
    3 begin
    4 rc := system( '/usr/bin/touch /tmp/plsql-test' );
    5 DBMS_OUTPUT.put_line( 'return code='||rc );
    6 end;
    7 /
    return code=0
    PL/SQL procedure successfully completed.
    SQL>
    SQL>
    SQL>
    SQL> -- display the test file
    SQL> ! ls -l /tmp/plsql-test
    -rw-r----- 1 oracle dba 0 May 17 14:36 /tmp/plsql-test
    SQL>
    You may need to define a different library on yours. The kernel shared lib is suppose to be libc.sl - for a reason I cannot recall anymore, I've changed it to use libc.2.
    Oh yeah - the system call will be without any environment. Thus you cannot rely on any standard shell environment variables like PATH - you need to fully qualify executables and files (i.e. include the path).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • UNIX command for terminal

    Here is what I want to do:
    I want to send the terminal command to 25 laptops all at once to direct them to our internal server for software update.
    I know how to log in to all of the machines at once.
    osascript -e 'tell application "System Events"' -e 'keystroke "username"' -e 'keystroke tab' \
    -e 'delay 0.5' -e 'keystroke "password"' -e 'delay 0.5' -e 'keystroke return' -e 'end tell'
    I know how to open terminal.
    open -a terminal
    Now what I want to know is how to have it type this in for me:
    sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURLhttp://SERVER.local:8088/index-mountainlion-lion-snowleopard-leopard.merged-1.su catalog
    Then have a pause and then type my password.
    Bonus points for then a script to force it to check for and do the update.

    You don't need to use send unix command to send osascript to login, and then open the terminal to then type in a termainl command.
    you can just do
    send unix command
    as user root
    defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURLhttp://SERVER.local:8088/index-mountainlion-lion-snowleopard-leopard.merged-1.su catalog

  • Unix security and privacy setting unix command via apple remote desktop

    Could someone guide me on the unix command to set System Preferemces Security & Privacy to xx minutes [see screenshot please] via Apple Remote Desktop.
    https://dl.dropbox.com/u/5485939/osx_screenshots/sys%20pref%20security%20privacy .png
    Thank you,

    Pereference tend to be stored for the computer as a whole
    /Library/Preferences/
    or specifcally for the user
    /Users/USERNAME/Library/Preferences/
    well when I set required password for XX minutes... I see that
    /Users/USERNAME/Library/Preferences/com.apple.screensaver.plist modfication date & time changes to the current time & date... hMMM maybe the setting we want is stored here? Can we test this?
    If I check require password and then do the terminal command:
    defaults read ~/Library/Preferences/com.apple.screensaver
    I see
        askForPassword = 1;
        askForPasswordDelay = 0;
        tokenRemovalAction = 0;
    turn it off
    run the terminal command;
    defaults read ~/Library/Preferences/com.apple.screensaver
    I see:
        askForPassword = 0;
        askForPasswordDelay = 0;
        tokenRemovalAction = 0;
    so I can turn it on with
    defaults write ~/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    and I can turn it off with
    defaults write ~/Library/Preferences/com.apple.screensaver askForPassword -bool FALSE
    So if a user is logged into a computer. I could send unix command as current console user.
    defaults write ~/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    BUT what if the user is logged out? or there are more then one user on the computer?
    then I could run unix command as user root and send
    defaults write /Users/USERNAME/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    (replace USERNAME with the user's short name.)
    but what if I don't know the user name? or names
    send unix command as root
    ls -al /Users/
    get back a list of folders
    bob
    surely
    shares
    and then do
    send unix command as root
    defaults write /Users/bob/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    defaults write /Users/surely/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    you could also do some thing like
    defaults write ~/Library/Preferences/com.apple.screensaver askForPasswordDelay -integer 5
    if you want to change the period of time to lock to 5 seconds
    or
    defaults write ~/Library/Preferences/com.apple.screensaver askForPasswordDelay -integer 900
    (900 seconds  / 60 seconds = 15 minutes)

  • Error in creating user in SQL plus in Oracle12c?

    Hi,
    I am trying to create user in oracle 12c sqlplus. But it displays error as "invalid common user or role name". How to rectify this error?
    I am using this command : create user scott identified by tiger profile DEFAULT account unlock default tablespace  SYSTEM;
    Please suggest how to create user.
    Thanks & Regards,
    Trikoti Mohan.

    I am trying to create user in oracle 12c sqlplus. But it displays error as "invalid common user or role name". How to rectify this error?
    I am using this command : create user scott identified by tiger profile DEFAULT account unlock default tablespace  SYSTEM;
    Please suggest how to create user.
    Many things, even basic things like creating users, are done differently in 12c. In 12c there are common users and local users. You need to know and understand the difference. My 'guess' is that you are trying to create that user and getting an exception because you are trying to create that user in the root CDB and you can ONLY create common users in the root. And SCOTT can not possibly be a common user because common users are defined differently.
    You also need to read and understand chapters 17 and 18 of the Concepts doc about the new multitenant architecture of 12c.
    http://docs.oracle.com/cd/E16655_01/server.121/e17633/part_consol.htm#CHDGDBHJ
    See the sections in those chapters about common and local users.
    Then read my last reply in this thread:
    Re: 12c: ORA-65049: creation of local user or role is not allowed in CDB$ROOT
    There are TWO MORE issues you may have had or may have.
    1. The SCOTT user already exists if you created the example database as part of the installation. But that sample DB (and the SCOTT/HR and other users) are in a PDB and NOT in the root/CDB.
    2. By default the root/CDB is the ONLY database affected by the STARTUP command. So if you start a multitenant database that has one or more PDBs (e.g. PDBORCL installed as the example DB) those PDBs will NOT be open or accessible until you MANUALLY open them.
    Alternatively you can create an AFTER STARTUP trigger that opens PDBs for you as part of the startup process.
    Lastly you should NOT alter the SYSTEM tablespace or schema or use them for your own objects.
    There are several other threads in this forum where I discuss other issues new 12c users are likely to run into. Search for rp0428.

Maybe you are looking for