Alternatives to "reboot" after changing crucial files in a working server? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
Assume I have a server already functioning and providing an app to users. At one moment, I have to modify some crucial /etc/ configuration files. For example, /etc/security/limits.conf.
After I do the changes, documentation usually suggests rebooting the machine.
reboot
But this would imply that all processes in the server die, am I right? So, basically what will happen to the guys checking my app hosted on the server that I just "rebooted"? I think the service will stop for a while. Is there any other command or alternative less painful to do after changing crucial files?
I'm on CentOS & Nginx.
PD: If somebody could provide also a link to the difference between "shutdown" and "reboot" (because I found only some vague things), that would be great.

Easy part first - if you run shutdown your computer ends up being off. As in no power. As in, very difficult to fix remotely :). Reboot restarts everything.
It is fairly rare to require a reboot under linux - the only reason to reboot that I can think of is if you upgraded the kernel, if your machine is crashing really badly, or if you want to install some types of new hardware (RAM, plug-in cards etc).
Mostly, when you edit "important files in /etc", you can restart just a part of the system. For example, you might need to restart just your webserver.
There is no complete rule. Try googling "reload ". For example, googling "reload /etc/security/limits" suggests logging out, then logging back in.

Related

Creating hidden OS with linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I know that truecrypt isn't capable of creating a hidden OS but in another post someone describes the steps to do it manually and that he does it to all of his linux computers all of the time. Can anyone elaborate on his steps so that someone (like myself) who is not as experienced could accomplish this?
I would just ask this individual to provide more details but it appears as though their account is "anonymous" or something.
I developed something like you are describing.
Here https://github.com/antonio-petricca/buddy-linux you can find all the information and installation script.
Buddy linux allows you to install linux on (hidden) loop files (like for the link you provided), but providing GRUB loader by an external USB drive. So, removing, it will results in a Windows boot.
The other good stuff is that it is based on LVM, so you can extended file system "simply" by adding loop files as per your needs.
Regards.

Run ssh forwarding command before nagios command [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have a number of machines which I would like to check using my Nagios box. They sit behind a machine which is reachable from my Nagios box; all are running Linux. These machines have no routing to outside networks. If I need to reach the machines manually I either ssh to the intermediate box and then ssh to the other machines, or I'll use ssh to forward a port.
I usually use SNMP for most of my checks. So my thought is that prior to my Nagios box running a check I could have it run a command to forward the needed port, then get rid of the forward when done. Can anyone guide me on the best way to do this?
Thanks!
You probably want to look into Nagios passive checks. As described in the documentation:
Passive checks are useful for monitoring services that are:
Asynchronous in nature and cannot be monitored effectively by polling
their status on a regularly scheduled basis
Located behind a firewall and cannot be checked actively from the monitoring host
Your use case is pretty clearly the second one.

Run SSH without ANY Authentication [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I know it flies in the face of the very notion of a "secure shell," but I would like a way to run SSH that requires absolutely no authentication whatsoever. I have a collection of machines that run on a totally air gaped network. It's used for a hardware prototyping project, and for reasons beyond my understanding some of these machines occasionally start asking for a password regardless of the fact that they have all been cloned with the same SSH keys that work some times.
I'd really like to side step all the security issues that can prevent SSH from connecting to a machine. I've seen in other posts people strongly recommending against what I am trying to do; but I've wasted enough time trying to fight SSH's security features. Is there a flag I can use? A change to a config file? Another version of SSH I can install?
Any help would be appreciated.
It seems that you want a 'remote shell', so try rsh.

/boot/.IpTables use high cpu in my server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
i am newbie in network administrator..
One week ago, my server work perfectly. My Server can serves 600++ users at the same time and only use 40% cpu.
Today there is something wrong with my server. My server shows 100% cpu usage when it serves 100 users at the same time.
After i check, i found a process /boot/.IpTables that use high cpu.
What happen with my server? Is my server hacked or what?
This is SS my server process :
OK, looks like your system has been had. I did some googling for /boot/.Iptables, and it appears to be malware.
https://askubuntu.com/questions/407457/help-my-server-has-been-hacked-iptables-and-iptablex-in-boot
https://www.centos.org/forums/viewtopic.php?f=17&t=46704
My personal recommendation would be to take the machine of the network immediately, clone the drive to a USB disk, and re-install (preferably w/ a new set of passwords, and all available patches applied).

Automatic restart of a crashing Linux daemon [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a Linux server application that I managed to "deploy" as a daemon that can be started automatically when the machine starts, independently of user sessions..
I wonder if it is possible to tell the system to automatically restart the application when it crashes, like the service manager in Windows..
Thank you in advance.
Give it a look to monit, it monitors any service/daemon. You have to configure Monit in order to know what criteria to use to start/stop or email you in case something wrong/strange is going on.
What you need is a process supervisor, a utility that manages your daemon and decides when to start/stop it among other things.
There are several of these out there such as supervisord, upstart, runit etc. You will have to research them and find one that best suits your needs.
Hope that helps.

Resources