Ubuntu Servers :: Automate Grub - Send Commands To It Via Ssh?

Sep 9, 2010

I have a server that is triple boot and the server is headless and accessed using ssh. So is there a way to tell grub before hand what os to choose or send commands to grub (of course I get rid of the timeout) to pick a different os other than the default one. Any ideas? I already know this is bad practice to have multiple os's on the same machine to be used as a server, but what about selecting a different kernel at start up.

View 7 Replies


ADVERTISEMENT

Programming :: Automate The Password Prompt Required For Sudo Commands?

May 31, 2011

I have written a script to run commands on remote servers, it is working fine. But when I am running "sudo commands" on the remote servers, it asks for me password after prompting for ssh password. I am unable to automate this password prompt (which is just after ssh password prompt). This is the function I am using to provide passwords

Code:

pass ()
{
cd $DIR/"$dt1"_"$dt"
/usr/bin/perl << 'EOF'
use strict;

[code]....

I want the same function to be used , when it expects for sudo passwords for any of the below lines:

Code:

[sudo] password for vikas: orPassword: This is my "cmd" file passed in pass () function.

Code:

ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 192.168.1.100 "bash rcmds"

This is my script output

Quote:

[vikas@box1 ~]$ ./rscript.sh
++ rm -rf /home/vikas/May_31
++ mkdir -p /home/vikas/May_31
++ set +x

[code]....

how to automate the password prompt required for sudo commands.

View 8 Replies View Related

Software :: Shell Script Commands To Automate Server Or Host Telnet Login Session?

Feb 7, 2010

finally i found the script for telnet automated login session...<<Mod edit: questionable link removed>>

View 4 Replies View Related

Ubuntu Servers :: Way To Automate The Server Login?

Feb 5, 2010

just installed server edition... and is there a way to automate the server login?or through ssh because i want to get rid of the monitor i have plugged into it

View 1 Replies View Related

Ubuntu Servers :: Script To Automate Website Interaction?

Mar 21, 2010

Here is what I have. Everyday I go to 8 websites that require entry of a username and password. When I've logged in, I select exactly the same info using the sites navigation and specify a report generated by the site. I then tell the site to save as an excel file and save it as an existing spreadsheet, 8 times for eight different files

How can I make this more direct? Can a script be written that provides username and password, selects the parameters I want, saves the spreadsheet and goes to the next site to repeat the process and save under a different name?

This would be used in a Windows XP/IE 7/corporate environment.

View 7 Replies View Related

Ubuntu Networking :: Send AT Commands To LG GW620g?

Oct 6, 2010

I need to send AT commands (hayes commands) to my LG GW620g (amongst other purposes, for receiving and sending SMS from the shell). Can somebody help me and tell me what I have to do in order to connect a mobile phone (or _this_ mobile phone) as ttyS0 or ttyACM? I guess it has something to do with udev, but I am not sure there. Or is there another way to open a terminal connection to this device?

View 1 Replies View Related

Ubuntu Servers :: Write A Shell Script In Order To Automate The Process Of Uploading A File?

May 21, 2010

I am trying to write a shell script in order to automate the process of uploading a file onto an FTP server using the built in FTP commands in ubuntu server (lucid). In order to connect I can use the following:

Code:

ftp wsbeorchids.org.uk
Name (wsbeorchids.org.uk:danielgroves): USERNAME
Password: PASSWORD

In need to pass my username and password in when prompted the prompts. How should I go about doing this? I have tried echoing the values without success. Please not that I am something of an amateur with scripting.

View 6 Replies View Related

Software :: Grub Drops To Grub Prompt On Boot / But Can Use Commands To Find Menu

Jun 5, 2009

I've got myself the curious situation where, when I boot the system, I can get grub to start, but it always drops to the prompt.

I can run:configfile /grub/menu.lst

and this brings up the menu with no problems, and from there I can boot the system to either linux or windows. What I don't understand is why it wont go to the menu in the first place?As far as I can tell, grub/Kubuntu got confused when installing, as each of the hd#,# settings in the menu.lst have needed tweaking to let the system boot. (e.g. windows is actually hd0, but the original install had it at hd2. Likewise linux is on hd1, but the menu.lst had it at hd0). I've happily tweaked these to make the system boot, but would appreciate any help in convincing grub to actually load the menu without me having to use the prompt.

View 7 Replies View Related

OpenSUSE Install :: Commands Make System Boot To Grub Shell Instead Of Grub Menu?

Apr 17, 2010

I started another thread about this to get help booting into openSUSE after Fedora rewrote my bootloader and deleted all other entries. I managed to fix it but I never did find out why the following commands caused my system to boot to the grub shell instead of the grub menu.

Code:
grub
root (hd0,3)
setup (hd0)
quit
reboot

Can anyone explain to me why these commands caused my system to boot directly to a grub shell? It's as if there were no /boot/grub/menu.lst files for it to use, but after I got everything back to normal, the files were still there.

If it helps, this is how the drive was setup before and now, except Fedora was on /dev/sda4 and has since been deleted.

Code:
Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 263 13316 104856255 83 Linux
/dev/sda3 * 13317 14621 10482412+ 83 Linux

View 6 Replies View Related

General :: Use The Minicom Or Seyon To Send AT Commands To The Droid Phone?

Aug 18, 2010

I was trying to connect my android phone just to send some AT commands using Minicom or Seyon. But I was not able to connect it. I have connected my phone using a USB cable.Do I need to connect my phone through the serial cable by using a minicom connector to be able to send the commands to the phone.Also when I launch it says Initializing Modem...thenModem at /dev/ttyS0 is available. If I try to Dial it says Warning related to the Baud rate.But After that I am not able to do anything.

View 7 Replies View Related

General :: Using The Expect And Send To Execute List Of Commands Inside A File?

Feb 2, 2011

i am working on some kind of PBX and i have list of telephone numbers inside a file, i have to insert these numbers into the correct command and then telnet to a remote server and execute these commands. i can read the telephone numbers and insert them into the command with no problem, but when i try to insert these commands into the send i face problem. here is the basic code

#!/bin/bash
read msisdn < input
string="ZZZZ:MSISDN=$msisdn;"

[code]....

i can make external loop inside the Bash which read the input file and issue the command and then telnet and execute, but this will make the script connects and disconnects again for each line which cause high load on that server and hardwar problem. i am wondering if there is an option inside the expect interperter which makes the send read directly from a file... somthing like this:

expect "<"
send "input-filename
"
expect "<"
expect eof

View 1 Replies View Related

Ubuntu Servers :: Send Mail (newsletter) From Web Servers

May 26, 2010

I handle several hundreds of domains. Mails are handled with google apps (but previously I used to have a full postfix/courrier setup with virtualhosting). Now what I need is to be able to send mail (newsletter etc...) from my web servers, but I don't need to receive mail on these servers.

View 4 Replies View Related

Ubuntu Servers :: Getting Servers To Be Able To Send Emails?

Oct 28, 2010

I'm going to be setting up a couple of servers for some friends. I'd like them to be able to email me some information after they do some maintenance scripts via cron. I got my own server to send email using a tutorial I found but that involved using my personal gmail account. getting email sending working on ubuntu server with minimal fuss and account credential exposure?

View 2 Replies View Related

General :: Send Commands To Another "pseudo Terminal"?

May 8, 2010

Is there some way to send commands to another "pseudo terminal" or otherwise access one when the desktop environment has frozen to get a program there to save its data? (i.e. after logging in remotely) I tried "echoing" to "/dev/pts/X" (X = number) but that doesn't seem to work. It just displays whatever is echoed there -- it is not accepted as input.

View 3 Replies View Related

Ubuntu :: Need Grub To Pass On Some Commands To Secondary OS

Jul 29, 2011

So, I have a netbook with a 320GB harddrive and I'm testing all kinds of fun distros out. Right now I have 11.04, 11.10 daily, Jolicloud, Chromium OS, and MeeGo. Meego uses it's own weirdass boot loader, which sets things up a certain way. My computer has a touchscreen, and I had to modify some things to get it all working properly. Anyway, I reinstalled grub on my main partition (11.04), but now the command I need doesn't go through to meego.

The command is "usbhid.quirks=0x0eef:0x725e:0x40" For my other systems, I have it in /etc/default/grub in the "GRUB_CMDLINE_LINUX_DEFAULT=" line.

Obviously there is nothing like this in Meego, and a thread on their forum said I would have to configure it in whichever bootloader I'm using.

View 3 Replies View Related

Ubuntu :: Repair Booting With Commands On Grub Rescue?

Oct 10, 2010

i have using ubuntu for 3 days with no problem i have 3 operating system vista,7,ubuntu vista and ubuntu on c: drive today i want to use vista for something and when i open it on ubuntu boot menu my laptops recovery try to recover and just give an eror like:EROR with 200 punto when i restart computer i just saw eror: no such partition Grub rescue> command screen i have no recovery dvd and ubuntu cd now i left them to my friend so can i repiar it just with commands if ubuntu is demaged because of recovery screen on D: partition i have win7

i just start using ubuntu i dont know any thing about it

View 5 Replies View Related

General :: What Commands Are Used For : Grub Rescue>

May 11, 2010

i am using ubuntu 10.04 lts and my computer crashed,when the computer boots all i get is:

code: grub rescue>

what commands am i supposed to use?

View 1 Replies View Related

Ubuntu :: 11.04 Won't Boot / Can I Force X To Start In Vesa Mode Using Grub Commands

Jun 12, 2011

I'm trying to run ubuntu 11.04 (64-bit) on my hp pavilion tx2100ed but it won't boot. After the grub bootscreen it goes black and doesn't react to Ctrl-Alt F1 ..F4.
Also booting the recovery mode doesn't work
To be able to start the installer I had to use xforcevesa.
Does any one know what this can be and how to solve it?

can i force x to start in vesa mode using grub commands?

View 3 Replies View Related

Ubuntu Servers :: Commands Via Ssh On Server?

Aug 3, 2010

I have a server running. I administer this server via ssh and sftp. Commands that are executed on the ssh prompt are killed when I close the ssh connection. Is it not?If I put a '&' or '&&' after it, will this process keep running when I close the ssh connection?In what other way could I start 'applications'/processes in the background? like rtorrent for example.

View 5 Replies View Related

Ubuntu Servers :: Run Ssh Commands Though PHP On Website?

Nov 2, 2010

I'm trying to run ssh commands though PHP on my website. I found this tutorial for it: [URL] I've got a few problems here, when I do "apt-get install openssl-dev" I get this output:

Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package openssl-dev

[Code].....

View 7 Replies View Related

OpenSUSE Install :: 11.2 Boot Using Grub - Loading Commands?

Dec 4, 2009

I have openSUSE 11.2 and boot using GRUB. I was looking on start-up options for 11.2 and saw where it said
splash=silent
and
quiet showopts
I was wondering what they meant?

View 2 Replies View Related

Ubuntu Servers :: Any Way To See Running Commands With Timestamp?

Jul 26, 2010

I recently hired a new tech guy to start managing our servers. In doing this I went ahead and upgraded all the servers. It has been awhile now since I sent him the details of the new server and the last time I talked to him he was joking around with one of the other clients not realizing how long it took.

I know on other server moves, my old guy could have everything setup and running in a couple days as a good amount of time is waiting for the data to copy over. I am starting to wonder if this guy is going to try and throw a huge bill at me, so I would like to know what hes doing on the server with time stamps just so I can get a idea of how much time he has been logged into the server. Does this server OS have anything like this built in?

View 1 Replies View Related

Ubuntu Servers :: Where To Type Commands In Gnone Gui?

Oct 22, 2010

I am new to Linux, have used KDE/SLAX before but am now attempting to use linux on my old computer to accomplish these objectives:

1) Run an FTP so I (& my mates) can access files anywhere wit ease(no dramas).
2) Enable sharing of my drives so I can put files from Laptop into this computer

Now I have successfully Installed Ubuntu Server (Finallllly) but then messed up cuz I installed the Gnome GUI and now cant find any place where I can type any sudo commands. vsftpd should work for me right?

View 3 Replies View Related

Ubuntu Servers :: Set Sudo Commands Restrictions

Nov 7, 2010

does anyone know how to set restrictions on the commands a user can run as sudo? i want to make it so they can only halt the system.

View 1 Replies View Related

Ubuntu Servers :: Up Key For Previous Commands Not Working?

Nov 8, 2010

My previous experience with Ubuntu desktop (which isn't much) while in the terminal the up key allowed me to see previously entered commands, but I have freshly installed Ubuntu Server Edition and the up key is not allowing me to do so, Is there a way to get this working?

View 3 Replies View Related

Ubuntu Servers :: Using PHP To Send Mail?

Mar 3, 2011

I have setup a mail server on my remote Ubuntu 10.04 server using postfix.

Using Putty to SSH to the server, I can send mail, check mail, and the server accepts mail from other domains (gmail, yahoo, hotmail etc).

However, I cannot seem to send mail using PHP functions.

I have created a "test.php" file with the following contents:

[Code].....

When I run the .php file, nothing happens, and nothing logs in the mail logs, so I'm sure the server doesnt understand the mail command in PHP files, but I'm not sure how to go about fixing it.

Apache2, PHP5, postfix, and the additional necessaries are installed (this is a webserver/mailserver on 1 box)

View 9 Replies View Related

Ubuntu Servers :: Commands To Sysadmins Run When You Connect To A New Server?

Apr 22, 2010

What type of server am I on? code...

View 3 Replies View Related

Ubuntu Servers :: Prostfix Can't Send Mails?

Apr 10, 2010

using kubuntu 9.04 on AMD 64,working with ISPconfig panel.I have mail configured with Postfix. It works fine from the server (and of course through squirrelmail installed in it), but I cant send from other computers.

View 2 Replies View Related

Ubuntu Servers :: Send Email From PHP Using Pear

Jun 16, 2010

I host a webpage from my PC, and I was having all kinds of issues trying to get it to send emails. These steps send and receive the email through a gmail account. This page saved me.

Here are the simple steps
0. get a gmail account
1. install pear
Code:
sudo apt-get install php-pear

2. Install pear packages:
(I'm not really sure what this does, but I did it, and everything is working)
Code:
sudo pear install -o Mail
sudo pear install -o Net_SMTP

3. run php script to send email.
Code:
<?php
// Include the Mail package
require "Mail.php";
// Identify the sender, recipient, mail subject, and body .....

View 4 Replies View Related

Ubuntu Servers :: Cannot Send Mail Outside Of Machine?

Jan 5, 2011

I am attempting to get mail working on a server, and having some trouble. I'm working with sendmail, and I am to the point where I can send and receive mail on the server (from one user account to another), but I cannot send mail from the machine to somewhere else (specifically a Google Apps GMail account). When I try to send mail to the gmail account, I receive a "Undelivered Mail Returned to Sender" message. I've never managed any sort of mail server, and so far searching the internet hasn't helped me.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved