webdevRefinery Forum: [Solved]: help a fellow tech support assistant in need! - webdevRefinery Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Rate Topic: -----

User is offline jcahn93 

  • Group: Members
  • Posts: 6
  • Joined: 22-June 12
  • LocationCarbondale, IL
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL,Graphics,Flash

Posted 22 June 2012 - 08:28 AM (#1)

[Solved]: help a fellow tech support assistant in need!


So Ive been a bit confused dealing with ssh keys or something else, who knows maybe someone can help.

I run a set of computers on a network which are all running mac os x lion. I have a lion server serving them all up. I run remote desktop to update them and do anything else "tech"
support needed.

Here is my problem:

I need to write a line of unix commands that I can put into apple's program Remote Desktop. The reason is so that when I type in the command or my boss does, that all the computers will login. I figured that ssh keys with a root command would be good but terrible with security. If anyone has any other ideas.

The only downside to remote desktops unix command line is that it isn't actually a "terminal" so you can't install programs into the command line to run them like "sshsudo" or any of those programs.

Help please?
I have tried everything I know, but i am only a college student i have much to learn from the more skilled and professional in this field.

Thanks,

Jamie
--
Jamie Cahn
Web Programmer at Onboard Connections
e: jamie.cahn@onboardconnections.com
p: 551-482-6289
w: 618-521-7820
www.onboardconnections.com
0


User is offline Kyek 

  • Founder of wdR
  • Group: Administrators
  • Posts: 5078
  • Joined: 20-February 10
  • LocationPhiladelphia, PA, USA
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL

Posted 22 June 2012 - 10:01 AM (#2)

Hey Jamie :) Welcome to wdR!

I'm not certain I'm following you correctly, so let me explain how I'm envisioning your setup, and you can let me know if I'm very painfully wrong:

  • You're running Lion Server. Lion Server controls the accounts for all the other mac machines on the network.
  • The other machines on the network are independent macs. If a user sits down and logs in, they're logging in via the credentials set up on Lion Server.
  • You need to be able to Remote Desktop into Lion Server, and drop a command into Apple Remote Desktop's command line tool which will cause all the networked macs to log in as a certain user, as though a real human being just sat in front of each of them and typed a username and password.


Or do you mean that you simply need to be able to SSH to each individual machine?
0


User is offline jcahn93 

  • Group: Members
  • Posts: 6
  • Joined: 22-June 12
  • LocationCarbondale, IL
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL,Graphics,Flash

Posted 22 June 2012 - 10:49 AM (#3)

View PostKyek, on 22 June 2012 - 10:01 AM, said:

Hey Jamie :) Welcome to wdR!

I'm not certain I'm following you correctly, so let me explain how I'm envisioning your setup, and you can let me know if I'm very painfully wrong:

  • You're running Lion Server. Lion Server controls the accounts for all the other mac machines on the network.
  • The other machines on the network are independent macs. If a user sits down and logs in, they're logging in via the credentials set up on Lion Server.
  • You need to be able to Remote Desktop into Lion Server, and drop a command into Apple Remote Desktop's command line tool which will cause all the networked macs to log in as a certain user, as though a real human being just sat in front of each of them and typed a username and password.


Or do you mean that you simply need to be able to SSH to each individual machine?


basically what you said is what I'm trying to do. Plain sand simple is that I need to update all the computers on the network in the room but to do that I need to be logged into the "admin account" but its just a pain to log into 34 computers one by one, i would love to have like one line i throw into the command line that will log all the computers in at once. Remote desktop will allow me to update the computers all at the same time from one command once logged in, but typing the same username and password to 34 computers is unproductive.

im also now wondering if this is even possible?
--
Jamie Cahn
Web Programmer at Onboard Connections
e: jamie.cahn@onboardconnections.com
p: 551-482-6289
w: 618-521-7820
www.onboardconnections.com
0


User is offline Ruku 

  • I do Linux and that Internet thing.
  • Group: Members
  • Posts: 1351
  • Joined: 17-April 10
  • Location/root
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL

Posted 22 June 2012 - 04:48 PM (#4)

http://lifehacker.co...he-command-line

It's possible ;)
0


User is offline jcahn93 

  • Group: Members
  • Posts: 6
  • Joined: 22-June 12
  • LocationCarbondale, IL
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL,Graphics,Flash

Posted 25 June 2012 - 08:09 AM (#5)

thanks ruku ill try this one

okay that command will work, only problem is i still need a way to log into all machines at once.
--
Jamie Cahn
Web Programmer at Onboard Connections
e: jamie.cahn@onboardconnections.com
p: 551-482-6289
w: 618-521-7820
www.onboardconnections.com
0


User is offline NeilHanlon 

  • Group: Members
  • Posts: 884
  • Joined: 08-July 10
  • LocationRowley, Massachusetts
  • Expertise:HTML,CSS,PHP,Java,Graphics

Posted 25 June 2012 - 08:11 AM (#6)

I don't understand why it is you need to log into the machines. Can't you just deploy that script onto each of the machines?

Better yet, create a login script that polls for if an update is necessary, and runs the command once any user logs in.
Thanks,
兄ニール

Website | Blog | @NeilHanlon | About.Me | Facebook | LinkedIn
0


User is offline jcahn93 

  • Group: Members
  • Posts: 6
  • Joined: 22-June 12
  • LocationCarbondale, IL
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL,Graphics,Flash

Posted 25 June 2012 - 08:15 AM (#7)

well these computers are in a computer lab on a work network, the standard user does not have rights to update software and they will not, so that runs out the user log in, and using apples programs (which this one I'm not too much of a fan on) you need to log into every computer for the unix command line to open. The command line will only work for the computers that are logged on and that the program is monitoring.
--
Jamie Cahn
Web Programmer at Onboard Connections
e: jamie.cahn@onboardconnections.com
p: 551-482-6289
w: 618-521-7820
www.onboardconnections.com
0


User is offline NeilHanlon 

  • Group: Members
  • Posts: 884
  • Joined: 08-July 10
  • LocationRowley, Massachusetts
  • Expertise:HTML,CSS,PHP,Java,Graphics

Posted 25 June 2012 - 08:16 AM (#8)

Additionally, I found this on google. I'm sure you could set it up to work with your setup:

#!bin/sh
cat >/tmp/Login_Automatically.sh <<-"EOF"
if [[ "$(who | grep console)" == "" ]]; then # Runs ONLY if no one is logged in
osascript <<EOT
set username_ to "username"
set password_ to "password"
tell application "System Events"
key code 125 -- Down Arrow
key code 125 -- Down Arrow
delay 1
key code 125 -- Down Arrow
key code 125 -- Down Arrow
key code 125 -- Down Arrow
key code 125 -- Down Arrow
key code 125 -- Down Arrow
key code 125 -- Down Arrow
delay 0.5
key code 36 -- Return
delay 1
tell process "SecurityAgent" to set value of text field 1 of group 1 of window 1 to username_
tell process "SecurityAgent" to set value of text field 2 of group 1 of window 1 to password_
click button "Log In" of window 1 of application process "SecurityAgent"
end tell
EOT
fi
EOF
chmod 755 /tmp/Login_Automatically.sh
./tmp/Login_Automatically.sh
rm -f /tmp/Login_Automatically.sh

Thanks,
兄ニール

Website | Blog | @NeilHanlon | About.Me | Facebook | LinkedIn
0


User is offline gibbonweb 

  • 兄ヨハネス
  • Group: Members
  • Posts: 2062
  • Joined: 23-June 10
  • LocationMunich(DE)
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL,Graphics

Posted 25 June 2012 - 08:33 AM (#9)

View PostNeilHanlon, on 25 June 2012 - 08:11 AM, said:

Better yet, create a login script that polls for if an update is necessary, and runs the command once any user logs in.

No. You don't want to run updates exactly when the computer is needed. There's plenty of time to run them without bothering the users.
0


User is offline jcahn93 

  • Group: Members
  • Posts: 6
  • Joined: 22-June 12
  • LocationCarbondale, IL
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL,Graphics,Flash

Posted 25 June 2012 - 08:58 AM (#10)

i just fixed my problem! thanks all

http://hints.macworl...010021119293586

used that and i wrote "keystrokes" because they will log into the computer and use the unix command line!


Thank you all for your help!
--
Jamie Cahn
Web Programmer at Onboard Connections
e: jamie.cahn@onboardconnections.com
p: 551-482-6289
w: 618-521-7820
www.onboardconnections.com
0


User is offline NeilHanlon 

  • Group: Members
  • Posts: 884
  • Joined: 08-July 10
  • LocationRowley, Massachusetts
  • Expertise:HTML,CSS,PHP,Java,Graphics

Posted 25 June 2012 - 09:42 AM (#11)

View Postjcahn93, on 25 June 2012 - 08:58 AM, said:

i just fixed my problem! thanks all

http://hints.macworl...010021119293586

used that and i wrote "keystrokes" because they will log into the computer and use the unix command line!


Thank you all for your help!


You mean, exactly what I posted here?

http://webdevrefiner...post__p__123877
Thanks,
兄ニール

Website | Blog | @NeilHanlon | About.Me | Facebook | LinkedIn
0


User is offline jcahn93 

  • Group: Members
  • Posts: 6
  • Joined: 22-June 12
  • LocationCarbondale, IL
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL,Graphics,Flash

Posted 25 June 2012 - 10:08 AM (#12)

no not exactly. i used this script very basic and it worked.

osascript <<EndOfMyScript
tell application "System Events"
keystroke "username"
delay 5.0
keystroke return
delay 5.0
keystroke "password"
keystroke return
delay 5.0
keystroke return
end tell
EndOfMyScript
--
Jamie Cahn
Web Programmer at Onboard Connections
e: jamie.cahn@onboardconnections.com
p: 551-482-6289
w: 618-521-7820
www.onboardconnections.com
0


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Enter your sign in name and password


Sign in options
  Or sign in with these services