Shell script login ssh

Quick question with a quick answer, how can I make my shell script enter the login password to my remote server?
Ex.
#!/bin/sh
ssh (user)@(ip here)
(enter password)
...and so on...

In addition to using keys. it would be advisable to limit what commands can be run using
the key.
see: sshd(8): under the "AUTHORIZED_KEYS FILE FORMAT" section.
command="command"
Specifies that the command is executed whenever this
key is used for authentication. The command supplied
by the user (if any) is ignored. The command is run on
a pty if the client requests a pty; otherwise it is run
without a tty. If an 8-bit clean channel is required,
one must not request a pty or should specify no-pty. A
quote may be included in the command by quoting it with
a backslash. This option might be useful to restrict
certain public keys to perform just a specific
operation. An example might be a key that permits
remote backups but nothing else. Note that the client
may specify TCP/IP and/or X11 forwarding unless they
are explicitly prohibited. Note that this option
applies to shell, command or subsystem execution.

Similar Messages

  • Add Password to Shell Script for ssh

    Hi I'm trying to avoid creating ssh keys for this I was hoping to write it all in to applescript.
    This is what I have.
    I've done lots of searches, but not quite getting the right outcome.
    Matt
    set ShellS to "rsync -aE --progress --delete --exclude=\"._*\" /Volumes/Images/2014-2015 [email protected]:/Volumes/ImagesB/ "
    do shell script ShellS

    Thanks, that did help, I wondered what all those extra files were,
    Now searching the net this is where I am at., But I get the error
    error "invalid command name \"rsync\"
        while executing
    \"rsync -a --progress --delete --exclude=\"._*\" -e ssh /Volumes/Images/2014-2015 [email protected]:/Volumes/ImagesB/ \"" number 1
    set sshPasswd to "PSW"
    set ShellS to "rsync -a --progress --delete --exclude=\"._*\" -e ssh /Volumes/Images/2014-2015 [email protected]:/Volumes/ImagesB/
    expect {
      \"Password:\" {
          send \"" & sshPasswd & "\\r\"
          exp_continue
        \"yes/no?\" {
          send \"yes\\r\"
          exp_continue
    do shell script "expect <<<" & quoted form of ShellS

  • Secure login to remote UNIX host and run a shell script

    Hi I am new to JAVA. I want to login to remote UNIX host from my application secure login (SSH) and run a shell script reside that remote host. Can any one let me know the way how to do it. If possible provide the code example.

    Runtime.exec with an ssh command (not really recommended).
    Much better, an SSH API (JSch, which needs JZlib, from http://www.jcraft.com/ is a good one).

  • Run a shell script at login?

    I would like to run a simple shell script each time a user logs in. Currently, I have it wrapped in an Automator executable that is included in "Login Items", but figured there must be a more elegant way? Thanks.
    More info:
    The problem I'm trying to solve is that of file permissions when sharing one iTunes and one iPhoto library between multiple users on one computer. The libraries are located in /Users/Shared and the apps were pointed to the relocated libraries by holding down 'Option' on startup. The problem is that work done by each user in the iTunes or iPhoto library inherits the default permission settings of that user, making any new additions to the libraries, read-only to the other users. I'm using `chmod` on login to fix it. Let me know if you know of a better way to address this. Thanks again.

    I wrote a simple shell script that executes each time a user logs in (well, actually, each time I log in, coz' it's not really applicable to other users). It syncs my work and home addressbooks and iCal calendars to one another.
    I named it "sync". Then I read somewhere that if you wanted to make it double-clickable (to launch it from the Finder), I appended a ".command" filename extension (so it's now named "sync.command"). I also did a chmod 755 to that file so that it had execute privileges. Depending on whether you give each user their own copy of this thing, or keep a single copy in, say, the /Users/Shared directory, you may have to play around with chmod. Whatever, just so long as the user that has just logged in has execute permissions to the file, and to the entire path to the file, you should be good.
    Then, in SysPrefs > Accounts > Login Items, I added that "sync.command" file to the list. So, really the only difference is I'm not wrapping mine inside an Automator script like you are.
    I had tried adding it to ~/Library/LaunchAgents and make a launchd plist for it, that would kick it off at login. But I didn't get that to work. Don't know why. But just adding the double-clickable executable unix script to the Login Items list did the trick. Whether the plist has to hang out there with it, I don't know. I still have it there, though, in case I ever get motivated to figure out what's wrong with my launchd plist file. So, if just adding it to the Login Items list doesn't do it for you, you could try making a (functional?) launchd plist for it and plopping them both in ~/Library/LaunchAgents, too. That's how I am now, and, like I said, it launches at user login as that user's process (not as a root process like the above referenced article said how login hooks worked -- although, you may want it to run as root since you want this to work with multiple users...in which case, you might want to listen to Cole and not me...).

  • Do the shell script have to login into Oracle Apps

    I am calling the Document Processor Java API from a shell script. The problem I have that its unable to find the
    xdo://PO.POXPRPOLXMLRTF.en.US/?getSource=true
    file within the control file.
    Is this because somewhere a shell variable needs to be set, or a login need to be made into the Oracle Apps, so this template stored in XML Publisher is accessible.
    Please advise!

    Another things you can do is
    begin
    tmp_res := apps.fnd_web_sec.CHANGE_PASSWORD('TESTUSER','changeme',false);
    update fnd_user set password_date = null where user_name = 'TESTUSER'';
    end;
    Once you do this, when the TESTUSER logs in with the password=changeme, he/she will be redirected to the change password page.
    Hope this helps,
    Sandeep Gandhi

  • Shell Script FTP Login

    Hi,
    I want to call a shell script ftp to connect to a server, below the code of my file:
    ftp -n <<BODY
    open 172.30.10.XXX
    user SAP SAP
    pwd
    bye
    BODY
    when i run the script with function SXPG_COMMAND_EXECUTE and and command name Z_SH, return code is Not connected.#
    The script can't login.
    Anypone could help me.
    Thanks and regards.
    Eduardo Paiva

    Hi Friend,
    Can you check this link  will help you some extend : [FTP open file;
    Regards,

  • Running shell script at startup (before login)

    Objective: on the Mac side of a dual-boot Intel, I want to automate running a shell script at startup that will unmount the "Untitled" Windows partition. As a single line command, the following runs correctly when invoked manually from Terminal:
    /usr/sbin/diskutil unmount force disk0s3
    How can I include this script in the startup sequence?

    V.K. asks: "why do you need to do this before login?" And macwiz1220 suggests including in Login Items an app created by AppleScript that launches Terminal and runs the diskutil command.
    When I create and run such an app at login, I encounter problems with Terminal, which is why I thought to run an .sh script at startup. But if we can debug the problems with Terminal, then I won't have to venture into the more complex solutions offered by gbullman and Barney-15E. Terminal problems:
    (1) When Terminal prefs for Settings>Shell are set this way:
    (a) When the shell exits: Close the window.
    (b) Prompt before closing: Never
    then the result is: Terminal is launched and exits quickly, but the "Untitled" volume is not unmounted.
    (2) When Terminal prefs for Settings>Shell are set this way:
    (a) When the shell exits: Close the window if the shell exited cleanly
    (b) Prompt before closing: Never
    then again the result is: Terminal is launched and exits quickly, but the "Untitled" volume is not unmounted.
    (3) When Terminal prefs for Settings>Shell are set this way:
    (a) When the shell exits: Don't close the window
    (b) Prompt before closing: Always
    then after invoking the script, Terminal properly unmounts "Untitled" and presents a dialog: "You have 2 windows with running processes. Do you want to review these windows before quitting?" Here are the two Terminal windows:
    an echo of the cmd "/usr/sbin/diskutil unmount force disk0s3" followed by a report on return: "Volume on disk0s3 force unmounted." I don't want the user to have to see this and close the window.
    (ii) a fresh Terminal session, no commands entered. I also don't want the user to have to deal with this.
    How can I get Terminal to properly unmount the object, and shut down without demanding user interaction?
    P.S. what is an O.P.?

  • Test  ssh -ND connection in a shell script

    I use a web proxy with firefox by setting up this ssh tunnel:
    ssh -ND 8080 [email protected]
    Is there a shell script way (like with nc) I can test this connection?

    Hi Bill,
       I don't know if I'll be able to provide all of the help I'd like to because I have to get ready to go out of town. You used Fink to install "wget", right? "wget" will do almost anything a browser will do so I can't think of a better way to test from the command line. If you don't have "wget", "curl" will do. Is that what you had in mind? You can probably do it with "telnet" but "wget" understands complex URLs which, to my taste, is an easier way to specify the port.
    Gary
    ~~~~
       Lizzie Borden took an axe,
       And plunged it deep into the VAX;
       Don't you envy people who
       Do all the things YOU want to do?

  • Need last [login, access, bind] time plugin and/or shell script

    Hi Gurus,
    I was wondering if anyone could share their pre-op bind plugin (and/or shell script) to store the last access time. We have a heterogeneous UNIX environment (Solaris, HP-UX, and Linux clients and Sun JES DS 5.2 on Solaris 9 as name service repository) and need to implement account suspension if the user has not logged in in the specified period.
    Thanks.

    Thanks for the reply, I've updated my OP with proper code tags.
    The g13 is a gaming keyboard https://wiki.archlinux.org/index.php/Logitech_G13
    I'm attempting to use the 'g13' outlined section
    I will look into udev rules, thanks again.

  • Shell with SQL Script (Login authentication)

    First I hava shell script(create_ydb.sh), the content is :
    #!/bin/sh
    sqlplus /nolog @create_ydb.sql
    Then the content of the create_ydb.sql:
    set verify off
    PROMPT specify a password for sys as parameter 1;
    DEFINE sysPassword = &1
    host /ORACLE_HOME_PATH/bin/orapwd file=/ORACLE_HOME_PATH/dbs/orapwYDB password=&&sysPassword force=y
    @CreateDB.sql
    Then the content of the CreateDB.sql:
    connect "SYS"/"&&sysPassword" as SYSDBA
    The first problem is , after the user input the password for sysPassword , he is not able to change it;
    so I tried to move the "input password part" to the shell script, but I don't know how to pass the
    value of sysPassword to the create_ydb.sql.
    The second problem is , if the user input the wrong password, how can I know that in the CreateDB.sql
    so that I can stop it to run and display the error message to the user.
    I hope someone can help me out, thanks ^_^

    Rather use the Linux/Unix shell read command and assign the password to a standard environmental variable. The prompt command and substitution variables in SQL*Plus are limited in what can be done. There's a lot more flexibility stepping into SQL*Plus with ready-to-use environment variables.
    Something like follows:
    /home/billy> cat x.sh
    #!/bin/sh
    read -p "Enter password> " PASSWORD
    sqlplus /nolog << EOF
            prompt you have entered password ${PASSWORD}
            set define on
            set verify off
            -- create a substitution var for password
            define password=${PASSWORD}
            prompt substitution variable contains &PASSWORD
            exit
    EOF
    /home/billy> ./x.sh
    Enter password> test
    you have entered password test
    substitution variable contains test
    /home/billy>

  • How do I create a package that will install a shell script?

    From various sources I have made this shell script which creates a hidden admin user, starts ard and sshd.
    I would like to make this a package which will run on a machine on first boot. (I'm using deploystudio to deploy ML)
    It creates a hidden user called testuser1 with the password of password1
    [code]# Create user record in directory services
    dscl . -create /Users/testuser1
    dscl . -create /Users/testuser1 RealName "testuser1"
    dscl . -create /Users/testuser1 UniqueID 401
    dscl . -create /Users/testuser1 PrimaryGroupID 20
    dscl . -create /Users/testuser1 UserShell /bin/bash
    dscl . -passwd /Users/testuser1 "password1"
    # Set up a hidden home folder
    dscl . -create /Users/testuser1 NFSHomeDirectory /var/testuser1
    cp -R /System/Library/User\ Template/English.lproj /var/testuser1
    chown -R testuser1:staff /var/testuser1
    # Grant admin & ARD rights
    dseditgroup -o edit -t user -a testuser1 admin
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/ki ckstart -activate -configure -access -on -users testuser1 -privs -all -restart -agent
    # Tell loginwindow not to show the user
    defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool TRUE
    # Alternate: defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array testuser1
    # start remote login ssh
    systemsetup -setremotelogin on[/code]
    I'm using package maker but it keeps failing. If I add it from somewhere like my Documents dir it says it will give my username the permissions instead of root. If I add it from / and make root the owner packagemaker errors probably because my user doesn't have the rights to it. I want it to copy somewhere then maybe have another script that copies to the same location and does an rm to remove the previous script so no admin details are left on the machine

    Basicilly I want to roll out an image that will work with all models of macs which are comaptible with Mountain Lion. To do so I'm using deploystudio with the installESD.dmg as the image. This way it will install the relevant drivers for each model of mac. So the image should work whether it's a mac pro tower/mac mini/macbook.
    Upon completetion deploystudio lets you run packages so I would like the script above to be in a package. I don't want it even to copy the script anywhere I would just like it to run the .sh file I've made if thats possible?
    I'm just not sure what steps to take with packagemaker, I've never used it before.
    But yeah the ultimate goal is: upon installation completetion setup hidden admin user that will have ssh and ard access.

  • What actions should I take after seeing this script running @ startup today?  "ARDAgent\" to do shell script \"say quack\"'"

    STEPS TAKEN:
    Logged into Mac for first time today.
    Noticed a new individual file in Directory Library ".a.text". (Settings disply hidden system file/folders)
    File contained only the text "--purge".
    Meta data on file directed source to bash process run @ startup.
    Attached History command output.
    Disabled ARD for now.
    SETTINGS:
    All Sharing was Off. 
    Firewall was set to Block All Incoming Connections.
    Home network with no other active users at time.
    Upgraded to Mavs 10.9.2 last night.
    Do not use any file sharing or remote access into Mac.
    The SSH host attempts were my old Amazon EC2 instances.
    Appears to start bitcoin app and few databases.
    Worth noting I've been having tons of various issues last few months.
    Thanks.
    <POB> My CommandLine prompts. XXXX on locals.
    XXXXXX:~ Administrator$ export HISTTIMEFORMAT='%F %T '
    XXXXXX:~ Administrator$ history
    <POB> OUTPUT
        1  2014-02-27 17:23:35 rm -rf ~/.Trash/*
        2  2014-02-27 17:23:35 cd
        3  2014-02-27 17:23:35 .
        4  2014-02-27 17:23:35 ./
        5  2014-02-27 17:23:35 cd
        6  2014-02-27 17:23:35 lib
        7  2014-02-27 17:23:35 cd/
        8  2014-02-27 17:23:35  
        9  2014-02-27 17:23:35 ls
       10  2014-02-27 17:23:35 cd downloads
       11  2014-02-27 17:23:35 ls downloads
       12  2014-02-27 17:23:35 ls Downloads
       13  2014-02-27 17:23:35 find / -nouser -ls
       14  2014-02-27 17:23:35 find /~nouser -ls
       15  2014-02-27 17:23:35 ls
       16  2014-02-27 17:23:35 ls /library
       17  2014-02-27 17:23:35 /LaunchAgents
       18  2014-02-27 17:23:35 ls /LaunchAgents
       19  2014-02-27 17:23:35 ls /Automator
       20  2014-02-27 17:23:35 ls /KeyChains
       21  2014-02-27 17:23:35 sha
       22  2014-02-27 17:23:35 toop
       23  2014-02-27 17:23:35 top
       24  2014-02-27 17:23:35 dscl . -list /Users UniqueID
       25  2014-02-27 17:23:35 $ dscl -plist . readall /users
       26  2014-02-27 17:23:35 $ dscl . readall /users
       27  2014-02-27 17:23:35 $ dscl . readall /503
       28  2014-02-27 17:23:35 ls/Users
       29  2014-02-27 17:23:35 - dscacheutil -q group
       30  2014-02-27 17:23:35 cd
       31  2014-02-27 17:23:35 cd.
       32  2014-02-27 17:23:35 cd .
       33  2014-02-27 17:23:35 ls
       34  2014-02-27 17:23:35 ifconfig
       35  2014-02-27 17:23:35 ifconfig
       36  2014-02-27 17:23:35 ifconfig
       37  2014-02-27 17:23:35 config helper
       38  2014-02-27 17:23:35 config
       39  2014-02-27 17:23:35 ls
       40  2014-02-27 17:23:35 ssh awsXXXX
       41  2014-02-27 17:23:35 defaults write com.google.Keystone.Agent checkInterval 0
       42  2014-02-27 17:23:35 exit
       43  2014-02-27 17:23:35 exit
       44  2014-02-27 17:23:35 /var/log/secure.log
       45  2014-02-27 17:23:35 ssh awsXXXXXX
       46  2014-02-27 17:23:35 exit
       47  2014-02-27 17:23:35 kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
       48  2014-02-27 17:23:35 sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfi x|x)/{print $3}'
       49  2014-02-27 17:23:35 launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
       50  2014-02-27 17:23:35 ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta} * L*/Fonts 2> /dev/null
       51  2014-02-27 17:23:35 osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
       52  2014-02-27 17:23:35 top
       53  2014-02-27 17:23:35 ps
       54  2014-02-27 17:23:35 top
       55  2014-02-27 17:23:35 top
       56  2014-02-27 17:23:35 top
       57  2014-02-27 17:23:35 sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/k ickstart -agent -stop
       58  2014-02-27 17:23:35 man who
       59  2014-02-27 17:23:35 who
       60  2014-02-27 17:23:35 whoami
       61  2014-02-27 17:23:35 ps -aux
       62  2014-02-27 17:23:35 ps
       63  2014-02-27 17:23:35 top
       64  2014-02-27 17:23:35 ps -eo pid,etime
       65  2014-02-27 17:23:35 top
       66  ??ps aux | less
       67  2014-02-27 17:23:35 pstree
       68  2014-02-27 17:23:35 ps -eo euser,ruser,suser,fuser,f,comm,label
       69  2014-02-27 17:23:35 pgrep
       70  2014-02-27 17:23:35 pgrep remote
       71  2014-02-27 17:23:35 apt-get install htop
       72  2014-02-27 17:23:35 htop
       73  2014-02-27 17:23:35 netstat -tulpn | grep :80
       74  2014-02-27 17:23:35 ls -l /proc/635/exe
       75  2014-02-27 17:23:35 swapon  -a
       76  2014-02-27 17:23:35 ma ps
       77  2014-02-27 17:23:35 man ps
       78  2014-02-27 17:23:35 man ps
       79  2014-02-27 17:23:35 ps -a
       80  2014-02-27 17:23:35 ps -A
       81  2014-02-27 17:23:35 whoami
       82  2014-02-27 17:23:35 ps -f
       83  2014-02-27 17:23:35 ps -G
       84  2014-02-27 17:23:35 ps -g
       85  2014-02-27 17:23:35 ps -T
       86  2014-02-27 17:23:35 ps-t
       87  2014-02-27 17:23:35 ps -v
       88  2014-02-27 17:23:35 ps start
       89  2014-02-27 17:23:35 top
       90  2014-02-27 17:23:35 ps
       91  2014-02-27 17:23:35 users
       92  2014-02-27 17:23:35 last
       93  2014-02-27 17:23:35 ls /var/log/wtmp*
       94  2014-02-27 17:23:35 last -f /var/log/wtmp.1
       95  2014-02-27 17:23:35 last -f /var/log/wtmp.0
       96  2014-02-27 17:23:35 ~/.bash_history
       97  2014-02-27 17:23:35 cat ~/.bash_history
       98  2014-02-27 17:23:35 ls /Automator
       99  2014-02-27 17:23:35 cat Automator
      100  2014-02-27 17:23:35 open ~/.bash_history
      101  2014-02-27 17:23:35 dscl . readall /users
      102  2014-02-27 17:23:35 ls/library
      103  2014-02-27 17:23:35 cd/library
      104  2014-02-27 17:23:35 cd..
      105  2014-02-27 17:23:35 cd
      106  2014-02-27 17:23:35 ls
      107  2014-02-27 17:23:35 cd Library
      108  2014-02-27 17:23:35 cd/Library
      109  2014-02-27 17:23:35 ls/Automator
      110  2014-02-27 17:23:35 toop
      111  2014-02-27 17:23:35 top
      112  2014-02-27 17:23:35 ifconfig
      113  2014-02-27 17:23:35 config helper
      114  2014-02-27 17:23:35 config
      115  2014-02-27 17:23:35 top
      116  2014-02-27 17:23:35 ps -a
      117  2014-02-27 17:23:35 ps -A
      118  2014-02-27 17:23:35 ps -aux
      119  2014-02-27 17:23:35 ps
      120  2014-02-27 17:23:35 getprocessforpid(677)
      121  2014-02-27 17:23:35 man ps
      122  2014-02-27 17:23:35 ps -U
      123  2014-02-27 17:23:35 ps -u
      124  2014-02-27 17:23:35 GetProcessPID(494)
      125  2014-02-27 17:23:35 GetProcessPID() q
      126  2014-02-27 17:23:35 GetProcessPID494
      127  2014-02-27 17:23:35 GetProcessPID 494
      128  2014-02-27 17:23:35 netstat -b
      129  2014-02-27 17:23:35 top
      130  2014-02-27 17:23:35 top
      131  2014-02-27 17:23:35 top
      132  2014-02-27 17:23:35 netstat -a
      133  2014-02-27 17:23:35 netstat -a | grep vnc | grep ESTABLISHED
      134  2014-02-27 17:23:35 top
      135  2014-02-27 17:23:35 netstat -a
      136  2014-02-27 17:23:35 top
      137  2014-02-27 17:23:35 top
      138  2014-02-27 17:23:35 netstat -a
      139  2014-02-27 17:23:35 ps -aux
      140  2014-02-27 17:23:35 netstat -a | grep vnc | grep ESTABLISHED
      141  2014-02-27 17:23:35 ps -aux
      142  2014-02-27 17:23:35 ps -A
      143  2014-02-27 17:23:35 ps -A
      144  2014-02-27 17:23:35 netstat -a | grep vnc | grep ESTABLISHED
      145  2014-02-27 17:23:35 netstat -a
      146  2014-02-27 17:23:35 top
      147  2014-02-27 17:23:35 top
      148  2014-02-27 17:23:35 netstat -a
      149  2014-02-27 17:23:35 netstat -a
      150  2014-02-27 17:23:35 netstat -a
      151  2014-02-27 17:23:35 q
      152  2014-02-27 17:23:35 top
      153  2014-02-27 17:23:35 top
      154  2014-02-27 17:23:35 sudo tmutil disablelocal
      155  2014-02-27 17:23:35 exit
      156  2014-02-27 17:23:35 top
      157  2014-02-27 17:23:35 top
      158  2014-02-27 17:23:35 top
      159  2014-02-27 17:23:35 top
      160  2014-02-27 17:23:35 top
      161  2014-02-27 17:23:35 top
      162  2014-02-27 17:23:35 neststat -n
      163  2014-02-27 17:23:35 netstat -n
      164  2014-02-27 17:23:35 netstat -n
      165  2014-02-27 17:23:35 ls
      166  2014-02-27 17:23:35 lsaf
      167  2014-02-27 17:23:35 cd ..
      168  2014-02-27 17:23:35 cd ..
      169  2014-02-27 17:23:35 cd ..
      170  2014-02-27 17:23:35 cd ..
      171  2014-02-27 17:23:35 ls
      172  2014-02-27 17:23:35 top
      173  2014-02-27 17:23:35 netstat
      174  2014-02-27 17:23:35 dscl . list/users
      175  2014-02-27 17:23:35 cd ~
      176  2014-02-27 17:23:35 dscl . list/users
      177  2014-02-27 17:23:35 dscl . list /users
      178  2014-02-27 17:23:35 dscl . list /groups
      179  2014-02-27 17:23:35 dscl . readall /users
      180  2014-02-27 17:23:35 netstat
      181  2014-02-27 17:23:35 netstat
      182  2014-02-27 17:23:35 whoami
      183  2014-02-27 17:23:35 ls
      184  2014-02-27 17:23:35 cd ..
      185  2014-02-27 17:23:35 cd ..
      186  2014-02-27 17:23:35 cd .
      187  2014-02-27 17:23:35 cd ..
      188  2014-02-27 17:23:35 ls
      189  2014-02-27 17:23:35 tree
      190  2014-02-27 17:23:35 cd Users
      191  2014-02-27 17:23:35 ls
      192  2014-02-27 17:23:35 cd Administrator
      193  2014-02-27 17:23:35 ls
      194  2014-02-27 17:23:35 cd ..
      195  2014-02-27 17:23:35 cd ..
      196  2014-02-27 17:23:35 cd ..
      197  2014-02-27 17:23:35 ls
      198  2014-02-27 17:23:35 cd Users
      199  2014-02-27 17:23:35 ls
      200  2014-02-27 17:23:35 cd Adminstrator
      201  2014-02-27 17:23:35 cd Administrator
      202  2014-02-27 17:23:35 ls
      203  2014-02-27 17:23:35 cd Downloads
      204  2014-02-27 17:23:35 ls
      205  2014-02-27 17:23:35 exit
      206  2014-02-27 17:23:35 whoami
      207  2014-02-27 17:23:35 ls
      208  2014-02-27 17:23:35 ls
      209  2014-02-27 17:23:35 cd Library
      210  2014-02-27 17:23:35 ls
      211  2014-02-27 17:23:35 cd Application Support
      212  2014-02-27 17:23:35 ls
      213  2014-02-27 17:23:35 cd ..
      214  2014-02-27 17:23:35 ls
      215  2014-02-27 17:23:35 cd ..
      216  2014-02-27 17:23:35 ls
      217  2014-02-27 17:23:35 cd pXXXXXXXX
      218  2014-02-27 17:23:35 ls
      219  2014-02-27 17:23:35 cd Library
      220  2014-02-27 17:23:35 whoami
      221  2014-02-27 17:23:35 sudo - Adminsitrator
      222  2014-02-27 17:23:35 ls
      223  2014-02-27 17:23:35 ls
      224  2014-02-27 17:23:35 sudo -
      225  2014-02-27 17:23:35 more /etc/hosts
      226  2014-02-27 17:23:35 scc ver
      227  2014-02-27 17:23:35 scc numprofiles
      228  2014-02-27 17:23:35 netstat -an |find /i "listening"
      229  2014-02-27 17:23:35 netstat
      230  2014-02-27 17:23:35 top
      231  2014-02-27 17:23:35 kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
      232  2014-02-27 17:23:35 sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfi x|x)/{print $3}'
      233  2014-02-27 17:23:35 launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
      234  2014-02-27 17:23:35 ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta} * L*/Fonts 2> /dev/null
      235  2014-02-27 17:23:35 osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
      236  2014-02-27 17:23:35 osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
      237  2014-02-27 17:23:35 top
      238  2014-02-27 17:23:35 dscacheutil -flushcache
      239  2014-02-27 17:23:35 sudo killall -HUP mDNSResponder
      240  2014-02-27 17:23:35 top
      241  2014-02-27 17:23:35 ./bitcoin-qt
      242  2014-02-27 17:23:35 cd $home
      243  2014-02-27 17:23:35 ls
      244  2014-02-27 17:23:35 cd ..
      245  2014-02-27 17:23:35 cd ..
      246  2014-02-27 17:23:35 cd ..
      247  2014-02-27 17:23:35 ls
      248  2014-02-27 17:23:35 cd Applications
      249  2014-02-27 17:23:35 ls
      250  2014-02-27 17:23:35 ./bitcoin-qt.app
      251  2014-02-27 17:23:35 top
      252  2014-02-27 17:23:35 ps -420
      253  2014-02-27 17:23:35 ps -9541
      254  2014-02-27 17:23:35 top
      255  2014-02-27 17:23:35 /Applications/Postgres93.app/Contents/MacOS/bin/psql ; exit;
      256  2014-02-27 17:23:35 /Applications/Postgres93.app/Contents/MacOS/bin/psql ; exit;
      257  2014-02-27 17:23:35 top
      258  2014-02-27 17:23:35 ps -a (2077)
      259  2014-02-27 17:23:35 ps -a2077
      260  2014-02-27 17:23:35 sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
      261  2014-02-27 17:23:35 top
      262  2014-02-27 17:23:35 on run
      263  2014-02-27 17:23:35 do shell script "osascript -e 'tell app \"ARDAgent\" to do shell script \"say quack\"'"
      264  2014-02-27 17:23:35 end run
      265  2014-02-27 17:23:35 ls -ls /System/Library/Filesystems/AppleShare/check_afp.app/Contents/MacOS/check_afp 2
      266  2014-02-27 17:23:35 sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
    <POB> END

    I'm extremely unclear on exactly what's happening. You mention something about a script running at startup in your subject, but then never mention that again. What's going on there? Where are you finding that script?
    That script would suggest someone playing a joke on you, by making your computer say "quack" every time you start up. That's not indicative of malware.
    On the other hand, a hidden file as you describe is a common malware trick, though I'm not sure why it would only contain "--purge" - that isn't a complete command, as far as I know, and the purge command isn't likely to be used for malicious purposes anyway.
    Still, you do have some indication that you're using Bitcoin-related apps, and there has been some Bitcoin malware that has appeared recently. See:
    New CoinThief malware discovered
    Note that the post on MacRumors that you refer to in your second post is almost six years old, and references a vulnerability that was closed later in 2008. It's completely irrelevant to any modern system.

  • Encrypting password in shell script on Solaris 10.

    Hi,
    I have a shell script & in that the username & password is specified. I can see the password. Is there any way to encrpyt password in Unix scripts on solaris 10 box.
    Please suggest.
    Thanks & Regards,
    Tejas

    Here are some examples of avoiding passwords in scripts.
    First, if it's a script that needs to use remote login, you could set up ssh keys in the authorized_keys file of the remote system to allow auto-authentication.
    As a more general example, you could create a shell function that prompts for the password and stores it in an environment variable to be used by the script or utility that you want to use. Here is an example that we use in our Red Hat systems to allow yum to tunnel through our http proxy:
    function yumproxy(){
        echo -n "Enter Proxy Username: "
        read -e username
        echo -n "Enter Proxy Password: "
        read -es password
        echo
        export http_proxy="http://$username:$password@ourproxyserver:8080/"
    }This is in .bashrc so that we can run it once just before running any yum commands (not that this means anything in a Solaris forum!)

  • Terminal starts the last shell script

    Hello,
    I have problem with Terminal. It should start with normal shell prompt, but in my case it starts with the script I called the last time.
    How it happened: I have created shell script called "logintoserver.sh", there is just "#!/bin/bash; ssh -Y -l someuser someserver". I have a link to this script on my desktop, so I can easily pop up a terminal session to my remote server.
    OK, this works, but when I call application Terminal directly then, from Finder/Applications/Utilities/Terminal, it starts that "logintoserver" script again. Now I cannot get my local shell prompt. I can only follow login script and then ssh to my emac back from that remote server, but it's not that nice, you see...
    I changed shell in Terminal preferences, no help. I believe there is some option "execute last command at the beginning of new session", but I can't find and disable it. When I delete this "logintoserver" script, all works OK. But I like to have one click login window.
    Thanks for any kick,
    David

    Hi Tim,
    thanks for your helpful info. Two questions:
    when I login to my remote server (Tiger Server) via SSH, the command line on my laptop changes to reflect the server name Im logging into.
    1. Laptop named "jimmydeuce" logs into 'margaritaserver' a Tiger Server via SSH
    2. laptop closes SSH session to server
    2. laptop now launches Terminal
    3. laptop now sees prompt line restated as: margaritaserver:~ username$
    how to get back to normal prompt: jimmydeuce:~ username$ ???
    Cheers,
    Chris Chamberlain

  • Shell Script Adapter - what kind of sudo privilege needed?

    Hi All,
    I have a requirement in my project where I need to manage unix user provisioning and de-provisioning by using shell scripts in AIX servers. For this purpose, I selected Shellscript adapter as it allows us to execute scripts that run on the resource.
    1. while I have account in the AIX server, I need to know what kind of sudo privilege is needed. Will I need sudo access to root? if yes, does it mean, I (or my account) should be added to root? please let me know.
    2. also, I tried configuring the adapter using the login id, host, password, login shell prompt, port and SSH. When i tried to test the configuration, it gave the following error,
    Test connection failed for resource(s):
    Shell Script: Failed to find 'useradd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'usermod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'userdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupadd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupmod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin'
    I am wondering why should it search for these commands? please let me know.
    thanks.

    Hi All,
    I got this issue resolved after a fine-grained sudo setting to the account that is used for provisioning.
    The revised sudo setting was able to do all the provisioning tasks without having a root access.
    This is what I set on my service account
    (root) /bin/awk, /bin/cat, /bin/cp, /bin/cut, /bin/grep, /bin/login, /bin/mv, /bin/rm, /usr/bin/auths, /usr/bin/cat, /usr/bin/chgroup, /usr/bin/chgrpmem, /usr/bin/chsec, /usr/bin/chsh, /usr/bin/chuser, /usr/bin/cp, /usr/bin/last, /usr/bin/lastlog, /usr/bin/listusers, /usr/bin/logins, /usr/bin/lssec, /usr/bin/mkgroup, /usr/bin/mkuser, /usr/bin/mv, /usr/bin/passwd, /usr/bin/profiles, /usr/bin/pwdadm, /usr/bin/rm, /usr/bin/roles, /usr/sbin/groupadd, /usr/sbin/groupdel, /usr/sbin/groupmod, /usr/sbin/lsgroup, /usr/sbin/lsuser, /usr/sbin/rmgroup, /usr/sbin/rmuser, /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod, /usr/sbin/logins
    (root) NOPASSWD: /usr/bin/chgrp, /usr/bin/chmod, /usr/bin/chown, /usr/bin/chpasswd, /usr/bin/cp
    In this way, you need not have to be a root user to perform provisioning using AIX.
    Hope this helps!!
    thanks.

Maybe you are looking for

  • -1303 error when syncing with Itunes

    Hi, I am getting an -1303 unknown error whenever I try to sync my ipod mini with my PC with ITunes software. Sometimes it updates everything and then crashes or it doesn't update and just crashes.

  • How can I change the ToolTip bg and fg colors?

    hi, I have a JTree, and I want to display a textual description for each node as a tooltip. I want the tooltip to appear with a certain bgcolor, and fgcolor. I have a CustomCellRenderer extending DefaultTreeCellRenderer with getTreeCellRendererCompon

  • Is my ipad 2 locked after putting in a sim card

    Bought an ipad 2 from apple and last year put in a ee sim pay as you go. Now want to sell the ipad  will it be locked now

  • Adcfgclone dbTier error in R12

    Hi all, Installed Oracle home 10.2.0.3 converted it to 64 bit, enabled autoconfig...and trying to run adcfgclone it says RC-00126: Update inventory failed. The inventory pointed at location /xxxx/db/tech_st/10.2.0/oraInventory is not valid Raised by

  • Playing mp4 sound files

    I am trying to make my code play a sound when a button is pressed.  At the moment I am using the play sound file block, but this block only accepts files in a .WAV format.  I am creating this program for someone who is not great with computers. Their