Ubuntu Servers :: Script To Automatize Systems Reboot?
Jun 3, 2011
I've been trying last days a script to reboot periodically my servers. My idea is to execute the script from one machine, and remotelly, restart the other servers. Now, I've configured ssh to access remote machine without password, using key-pair access, but I am not able to run "shutdown" command without password, so the script doesn't finish cause it waits for password to run shutdown with su priviledges
I've been reading about sudoers file, and applied this configuration on remote machine sudoers file.
Code:
# Cmnd alias specification
Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown
...
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
myremoteuser myremotemachine= NOPASSWD: SHUTDOWN_CMDS
I've been testing this configuration on remote machine, logged as myremoteuser, executing /sbin/shutdown -r now, but "shutdown: Need to be root" message is returned, so something seems to be wrong in my configuration but I don't know what.
View 9 Replies
ADVERTISEMENT
Oct 3, 2010
I am a Ubuntu user (10.04 as of now), since I use it, over a year, I have to manually enter the command $ sudo pppoeconf everytime I turn on the computer and want to connect to the internet, the I click enter some times, enter my password of my internet provider, then I click enter some more times to have internet.I have to do this boring work, 3 times a day, just now I am asking you if you know any way of automatizing this?
View 1 Replies
View Related
Jun 22, 2011
After an update recently I noticed that my process count jumped up quite a bit. Somehow it doesn't seem related (it was an apt update I believe), but I'll just throw it out there. All of the extra processes seem to be related to XFS and JFS file system kernel processes, but none of my file systems use XFS nor JFS, just EXT3 & EXT4. Is there any safe/easy way to kill off these processes and prevent them from re-spawning? I don't find having irrelevant idle processes to be beneficial nor efficient. It's using Ubuntu 10.04 64-bit. Only active file systems are EXT4 and EXT3.
[Code]...
View 2 Replies
View Related
Feb 16, 2011
I have two systems in both systems there I installed ubuntu 10.10. I need to know how to share an internet connection over the two systems at a time?
View 9 Replies
View Related
Jul 28, 2010
What is the name of two servers that allow you to share directories between systems?
what is NetworkManager? What does it do when you install a new NIC?
View 1 Replies
View Related
Feb 2, 2011
I'd like to share files between two Fedora 14 systems, but I'm having difficulty with making a share accessible via NFS.
Here's what I've tried so far:
Tried following mount commands:
Password:
Unable to find suitable address.
Used both the user and root password with this second mount command.
View 7 Replies
View Related
Dec 16, 2009
I am still puzzled by IT guru who still install a server version of Linux using the default partition system. I am curious about what the IT guys in this forum think about this, even when the server is part of a cluster.
View 1 Replies
View Related
Apr 25, 2010
I was using Ubuntu 9.10 and was using fireftp ( firefox plugin ) to do some ftp operation. And then I noticed firfox is fozen so I reboot my pc by switching off the power ( restart doesn't work ). When I turn it back on again, no GUI anymore. I was taken to ttyl login commend.
View 3 Replies
View Related
Nov 8, 2010
I just finished installing Ubuntu Server Edition 10.10. After reboot it brings me to a shell prompt asking for username and then password. After putting it in I just get a blank shell prompt. How do I get into the GUI ?
View 6 Replies
View Related
Nov 29, 2010
I have set up a new IP specifically for SSH and configured SSHD_Config accordingly to listen on this new interface and a specific port. However when I reboot SSH is not starting. Looking in the syslog it shows that it is unable to start. It looks like its trying to listen on the interface before it is set up.
Code:
Nov 29 13:00:23 anubis init: ssh main process (601) terminated with status 255
Nov 29 13:00:23 anubis init: ssh main process ended, respawning
Nov 29 13:00:23 anubis init: ssh main process (610) terminated with status 255
Nov 29 13:00:23 anubis init: ssh main process ended, respawning
Nov 29 13:00:23 anubis init: ssh main process (618) terminated with status 255
Nov 29 13:00:23 anubis init: ssh respawning too fast, stopped
I am able to start SSH manually once the server is booted. Do I need to set up my interfaces differently to ensure they are available prior to SSH starting somehow? I don't want to change my ssh config to listen on all addresses.
View 9 Replies
View Related
Feb 21, 2011
I have an iSCSI target on my Ubuntu 10.04 LTS server that is giving me access to 3 x 2TB volumes. I am using LVM to create 1 big volume and using it as a place for my backup software to write to. Upon initial setup I tested to see if the connection would still be there after a reboot, and it was. After going through the trouble of configuring my backup software (ZManda) and doing a few very large backups I had to reboot my SAN (OpenFiler) for hardware reasons. I took my server down while performing the maintenance and brought it back up only after the SAN work was done. Now, the LVM volume is listed as "not found" when booting.
Using iscsiadm I can see the target but LVM doesn't know of any volumes that exist using those targets. I need to get it back up and running and then troubleshoot the reboot issue.
View 2 Replies
View Related
Apr 1, 2010
I have a problem while rebooting my 9.10 server when I have SAN partition mounted. The message is something about the swap that can not be cleaned during the process. All works if I unmount the partitions before shutting down or rebooting.So I though to create a bash script that unmounts the parts during runlevel 0 and 6.I've created a simple script like this in /etc/init.d:
#!/bin/bash
umount /mnt/xxx
and the I've done:
[code]....
View 7 Replies
View Related
Apr 10, 2010
I am having problems with bond0 starting at boot on ubuntu server 9.10. After I do a restart I have to manually start the network with "ifup bond0". I have installed the built package (ifenslave-2.6_1.1.0-15ubuntu1_i386.deb (as indicated in Bug #482419)).
I have setup bonding for mode=6 with miimon=100 using eth0 and eth1 (both are Intel 10/100/1000 ports using an aic79xx network driver).
The contents of the aliases file are:
alias bond0 bonding
options bond-mode=6 miimon=100
The contents of the interfaces file are:
auto bond0
iface bond0 inet static
address 192.168.15.60
netmask 255.255.255.0
gateway 192.168.15.1
slaves eth0 eth1
bond-mode 6
View 9 Replies
View Related
May 19, 2010
The Machine
Core 2 Duo E4600
2GB DDR2 RAM (1 stick)
Intel ICH10R based motherboard (tried an ICH9R aswell)
4-port SATA controller (PCI Sil 3114)
O/S: Ubuntu Desktop x64 10.04 LTS (using 'desktop' because I like having a remote desktop)
The Storage Setup Disks: Assorted selection of 9 disk. 750GB, 1000GB and 1500GB Seagate and Western Digital disks. The disks are joined through a standard LVM2 configuration. I don't know the LVM term, but normally you'd call it a JBOD setup. On that LVM device, I've put a cryptsetup device, made with the LUKS tools (aes-xts-plain 256) On the cryptsetup device, I've created and mounted an EXT4 partition.
All in all, a completely standard LVM2 and LUKS setup, running EXT4. After a reboot, I proceed to unlock my cryptsetup encryption device, and then mount the EXT4 partition. All is well, the mount is accessible and everything looks fine. I then try to send a file to the mount, via Samba. After a few hundred MB written, the I/O wait goes berserk. It stays at 50% (dual core setup remember). The system becomes unresponsive to network commands (can't browse samba) for about 5-10 minutes. When it finally responds, the I/O wait is gone and everything is now fine. I can write and read hundreds of GB's of data without any issues at all. I can benchmark and stress all disks perfectly fine and no logs are showing disk errors.
I tried monitoring my disks with 'iostat -d 2' while the I/O wait was happening, and there is some slight Blk_read/s activity on 1 disk at a time. First for example /dev/sda is showing a little Blk_read/s acitivty, then it jumps to the next disk, and when every disk has show that slight Blk_read/s activity (500-800 or so) the problem is gone and the I/O wait is no more. I've tried changing motherboards, switching disks around on the controllers, checking individual disks, replacing disks and I've tried different versions of Ubuntu. The problem however persists. I could see it being a network issue, possibly a driver issue. But since the NIC is a standard RTL8111 on-board it seems unlike that the problem wouldn't be more widespread since this NIC is litterally being used everywhere. I did change my motherboard, so a faulty NIC seems unlikely twice in a row.
View 9 Replies
View Related
Nov 5, 2010
Where can I find the updates time line that requires Ubuntu server reboots for this year? Is there such a list ?
View 4 Replies
View Related
Dec 16, 2010
I have an Ubuntu 8.04 server running 2.6.24-23-server. I have a godaddy account and I am trying to upgrade my os version to 10.04, which requires a kernel upgrade. I have tried ksplice but kernel 2.6.24-23-server is not supported. I have heard about screen sessions but I have not found it possible to reboot one screen while having the other screen stay persistent if it is possible.So the main question is how to update Ubunut 8.04 to Ubuntu 10.04 with out rebooting the entire server? Rebooting is completely not an option at the moment.
View 1 Replies
View Related
Jan 5, 2011
I had a thread earlier asking for help installing Ubuntu Server to my homemade atom based NAS, but I gave up on that (GUI's are more helpful to me ) and so now I'm running Ubuntu 10.10 Desktop 64bit edition.Last night I was finally able to get mdadm set up. I have two 1TB disks set up in RAID1 config. I used
Code:
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
to create the array, and then waited until it finished assembling. Then I used System>Administration>Disk
[code]....
View 1 Replies
View Related
Feb 7, 2011
In /etc/ldap.conf I'm using my own nss_initgroups_ignoreusers setting. However, on each system start, Ubuntu adds its default nss_initgroups_ignoreusers line additionally to my own, and I have no idea where that comes from (needless to say, it's annoying!). So when I edit /etc/ldap.conf as follows:
Code:
# [...]
nss_initgroups_ignoreusers avahi,avahi-autoipd,backup,bin,couchdb,daemon,games,gdm,gnats,haldaemon,hplip,irc,kernoops,libuuid,list,lp,mail,man,messagebus,news,ntp,proxy,pulse,root,rtkit,saned,speech-dispatcher,sshd,statd,sync,sys,syslog,usbmux,uucp,www-data,backup
After I restart the system (and that happens on *every* startup), I've suddenly got two lines:
Code:
# [...]
nss_initgroups_ignoreusers avahi,avahi-autoipd,backup,bin,couchdb,daemon,games,gdm,gnats,haldaemon,hplip,irc,kernoops,libuuid,list,lp,mail,man,messagebus,news,ntp,proxy,pulse,root,rtkit,saned,speech-dispatcher,sshd,statd,sync,sys,syslog,usbmux,uucp,www-data,backup
[code]....
How can I disable this 'feature'?
View 1 Replies
View Related
Apr 2, 2011
I'm running Ubuntu 10.04 LTS. Last night I was doing some admin on this box, it's running apache and ASSP for spam filtering. Once I finished I started some updates.I checked for updates and applied them, but fell asleep. This morning, my session had timed out at continue. I reconnected and saw a message stating a reboot was required.I've rebooted, my usual services are running, eg apache and ASSP. I can view pages on apache and the admin page for ASSP. I'm remote from the system, so connecting over the internet and when I try to connect, it fails.
Quite urgent, however at least my services are working. However I'm not happy that I can't access the system myself.I don't know if this is my own fault for leaving updates unattended or if an update caused the problem. Thanks.
View 8 Replies
View Related
May 2, 2011
Is there any web interface that I can install to remotely reboot ubuntu? It would only be accessible via a VPN or on the LAN so not too much worry over security.
View 3 Replies
View Related
Jun 6, 2011
I have problem with my reboot command.
sudo reboot and sudo halt -f now don't work (they don't reboot)
but sudo halt -p is shutting down my PC.
View 9 Replies
View Related
Jul 26, 2011
I installed 11.04 server and had samba share /tmp (as advised by the server pdf doc) shared to my windows 7 laptop, which was all well and good, so copied some files to it and rebooted the server, and they had been removed.i guess i shouldnt have put anything in /tmp as i presume this is cleared on reboot, so why did the documentation advise to create /tmp share?
View 1 Replies
View Related
Mar 14, 2009
Ok this is one of those questions that have probably been made often. But I just CANNOT find a way around this on Fedora, and i have searched for it alot. Basically, after remotely rebooting my server, i'm not able to connect through vnc because the server needs to login. I've looked into an automatic login, but this is not the way i want to go. Edit: I'm using the default fedora vnc server, and RealVNC on my Windows computer. Been to ##linux on freenode, but at the time, noone there could answer me either.
View 5 Replies
View Related
Jan 12, 2010
I am running 9.04 Server (standalone). It had been running fine since I installed in last autumn. Upon reboot, fsck of the root filesystem was forced and it hangs at the same point (16.5%) every time. I was able to break out somehow with cntl-alt-del but the boot was to a read-only filesystem. So I couldn't disable the forced fsck. Instead, I tried to fsck there. It started, but hung. I couldn't do e2fsck -v as it needed the device and, although I worked on UNIX systems for decades, I am not familiar with the /dev/mapper stuff.
Looking at other threads, all involving the desktop GUI Ubuntu, I tried some of the suggestions. Went into the BIOS to see what I could disable. I killed the serial port and similar. (Some said that onboard modems interfered with the checks in /dev.) I also tried to boot from my original installation disk. That does work.The suggestion is to choose "Try without any change to your computer". The problem is that is not available on the server installation, apparently only the desktop (GUI). I had install, check CD for defects, test memory, boot from first hard disk, and something like repair or recover a broken disk. I started the last of them, as it seemed to be the only option. It failed because it couldn't get a dhcp address. I could manually configure it (as it is hard addressed anyway), but I didn't want to start screwing up configurations not knowing where it was going, whayt it would ry to do, and risk losing months of hard work.
Without help, I think I will be forced to install the OS on a second drive, use that install to fsck the original filesystem on the original disk, edit the fstab (or whichever has the config) on the original disk to disable fsck, and return to the original boot.I am building this server for a nonprofit and have put in many hours writing mysql/perl apache cgi code for them as a free service and hate to lose it all and set back everything.
View 2 Replies
View Related
Feb 18, 2010
I am trying to get a start up script to work, I have a file /etc/init.d/blah (with 755 permissions) with the contents [URL]. I have run "update-rc.d -f blah defaults". But when I reboot the script is not executing.
View 1 Replies
View Related
Mar 1, 2010
I have a personal ubuntu server that provides apache, glassfish, firewall, routing, email, CVS, MySQL, etc.... This server has been running for a while with two hard drives configured into a RAID 1 array. The array has two partitions, one for swap and one for the data. I currently back up the data with a removable hard drive. I use dd and create an image of one drive and the MBRs (partition tables) of each drive.In a disaster situation I can use this data to recreate one drive and then re mirror it to the second, or just boot the back up.I like this solution because I can easily recover from bare metal, and the backup is transparent. I can browser it if needed since its an uncompressed image of the drive. The one drawback is that I need to reboot the system with a linux CD to do the backup.
My hard drive space is almost at capacity. So what I want to do is add a third drive to the array and migrate it to RAID 5. However this will cause my current backup method to no longer work. How can I back up this RAID 5 array. I need to back up the entire system, and not just the data. I have made many tweaks to the system over the years that it has been running that I can't lose if a restore is needed. I have seen a large thread here that people have been using tar. My concern with tar is how do you use a tar archive to restore a system to a new array. Im assuming that you would need to setup the array and then just restore the archive? Also, i don't have much faith in using tar on a running system. Doesn't this open yourself up to corrupted backups? My second idea is using rsync. While I consider myself experienced in linux from 10 years of personal and professions use, I have not had much experience with this utility. Would rsync provide a more reliable way to backup a running system that would enable a bare metal restore later? I once read something about people using rsync with hard links to create a backup that could store many incremental backups.My main concern with both rsync and tar is not being able to restore the OS to the state that it was in at the time of the backup.
View 4 Replies
View Related
May 17, 2010
I'm installing 10.4 x64 on a Dell PowerEdge R610 RAID 1 and the install goes fine until I have to reboot the finish it. On reboot after about a minute it gives the error
Code:
Gave up waiting for root device. Common problems:
-Boot args (cat /proc/cmdline/
-check rootdelay= (did the system wait long enough?)
-check root= (did the system wait for the right device?)
-Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mapper/mysql1-root does not exist. Dropping to shell!
what to do and my co-worker who knows a little more about Linux can't get it to let him check any of the above common problems.
We're tried letting GRUB manually configure itself at the end og the install before we reboot and we've also pointed it to /dev/sba partition which is what should be the boot partition.
EDIT: in the code tag it's ALERT! /dev/mapper/mysql(one)-root.... the L and 1 look the same
View 9 Replies
View Related
Jun 17, 2010
My server keeps displaying a message: "The computer needs to restart to finish installing updates. Please save your work before continuing" every time I log on. Last night I did four consecutive reboots but the message is still there. I log i remote with NX / Gnome. Synpatic shows "0 to install/update 0 to remove".Is this normal? Does every single update need an independent reboot, so there is a queue to catch up with? Or is there some reboot flag that is not resetting properly after reboot?
View 9 Replies
View Related
Jul 13, 2010
I'm facing bit of a conundrum with my new server. It is essentially a distributed-virtual Plesk Virtuoso container with a rather simple LAMP setup (PHP5 etc) and virtual hosting. Running 10.04 LTS.
The issue is that on each reboot, the /etc/hosts and /etc/hostname files are reset with their original configs causing the virtual hosting to break, i.e. rather than hosting the vhosts correctly, it essentially routes all traffic to /var/www, or essentially 000-default ~ this beats the whole point of vhosting in the first place!
Is there any way to get around them being overwritten at boot? A very crude workaround would be to set a script to load at boot via init.d and have it rewrite both files to their correct configs - of course, I have no idea as to the point during boot at which they get replaced.
View 2 Replies
View Related
Jul 13, 2010
Have a headless server running Lucid 64 bit. Everything is working great except for a couple of Cron jos I'm trying to have run at boot.
My user crontab looks like this:
# m h dom mon dow command
01 * * * * /home/ceallred/Scripts/SambaBkup.sh
@reboot /usr/bin/SpiderOak --headless &The SambaBkup script works like clockwork...
The SpiderOak job doesn't start. It works if I type the command in manually.
syslog only shows:Jul 13 22:45:33 RavenWing cron[1010]: (CRON) INFO (pidfile fd = 3)
Jul 13 22:45:33 RavenWing cron[1022]: (CRON) STARTUP (fork ok)
Jul 13 22:45:33 RavenWing cron[1022]: (CRON) INFO (Running @reboot jobs)
Jul 13 22:45:33 RavenWing CRON[1048]: (ceallred) CMD (/usr/bin/SpiderOak --headless &)Yet ps -A doesn't show a running SpiderOak process. It shows after starting manually.
View 7 Replies
View Related