New answers tagged

1

Maybe you run out of Semaphores. Try this as root ipcs -s and check if there are a lot of semaphores owned by the same user. If so run the following command ipcs -s |grep username |awk '{print $2}' in the above command replace the username withn the actual user.


1

On Linux, the preferred way is to give ping (or other such things) special capabilities. This avoids the pitfalls of executing with root permissions via a setuid bit (read below). setcap cap_net_raw+ep /bin/ping From the Archlinux Wiki: Capabilities (POSIX 1003.1e, capabilities(7)) provide fine-grained control over superuser permissions, allowing ...


-1

This can also be caused by ssh-agent running. ps aux|grep ssh-agent It can safely be killed.


1

You didn't provide an OS for the server machine, so I'm going to make several assumptions here. You can use iptables for this on Linux servers (i.e. configure the server to act as a router). First, you need to enable IP routing on the server machine: sysctl -w net.ipv4.conf.all.forwarding=1 Let's assume the vlans are both connected to the server on eth1 ...


2

You're almost certainly better off with a shell script here. You could do it with a very, very ugly line like this: (note: not debuged/tested) mvn clean verify $( if [ ($(date +%H) -ge 0) && ($(date +%H) -le 6) ];then echo "-Dfindbugs.skip=false";fi;) The script would be a lot easier to look at anyway. It would look something like: if [ ($(date ...


2

No, this is not possible. Haproxy does not understand the FTP protocol, and therefore can't do things like re-write the FTP commands and responses that include the true IP address of the FTP server. If that's a requirement, then you'll have to find a different proxy solution.


0

I had the same problem using authorized_keys with permitopen. On server side, /var/log/auth.log contained: Received request to connect to host 127.0.0.1 port 10001, but the request was denied. As I use autossh to create a tunnel, I needed two ports: one for connection (10000) and one for monitoring (10001). The problem came with monitoring port. In my ...


1

Remember to use local-encapsulation: option space cisco; option cisco.wlc code 241 = array of ip-address; option local-encapsulation code 43 = encapsulate cisco; option cisco.wlc 10.7.3.6, 10.7.3.2;


2

Assuming you want to overwrite service-user's authorized_keys file with a completely new version, you could do something like this: cat master_authorized_keys | ssh -t user@target \ "sudo -u service-user tee ~/.ssh/authorized_keys >/dev/null" I don't know if the -t there is really necessary, but maybe it is in your environment.


0

You're looking for something called monitoring. You just setup some tests and monitoring software will run it and report results. There is many of those software, in example zabbix or nagios.


1

I found the prefect match (for me atleast). Now I use ServerSpec. You run it locally or remote on the test target machine and the test cases looks something like this: describe port(80) do it { should be_listening } end There are tons of test resources described here. You can check for existing users, files, crontab entries, iptables rules and much ...


0

I found another thread at U&L: http://unix.stackexchange.com/questions/31824/how-to-attach-terminal-to-detached-process perhaps the answer does work for your problem.


0

entr is the simplest and most composable file notification tool I have seen. Its use is optimized toward watching files rather than directories, but it can also solve your case. To detect and act on the added file, combine it with other tools like e.g. make. entr doesn't send the name or anything like that, it simply runs what you told it to run. To check ...


0

Most likely the switch isn't letting the packets through. Some pcaps might also be diagnostically useful.


3

You don't. But I have very little knowledge about server. and creating a name server are not compatible. Getting DNS right is quite complicated and really a waste of time as you get a large number of providers that do that for you for a few dollars a year.


0

I ran into this when testing out ssl on a site that was using a wildcard cert. Just add the DNS into your /etc/hosts file and restart apache. Make sure to remove this when you are done testing.


1

Here is a way to obtain a list of disconnected xrdp sessions. It relies on the fact that the xrdp server is, in normal X session manager usage, the only client that establishes a TCP connection to the Xvnc X Window System display server. When an xrdp session is active, the associated Xvnc display server has two TCP connections, one in the ESTABLISHED state,...


3

Solution is npm install --no-optional


0

iotop - it will help you identify process and then you can use lsof -c <process> to list all opened file descriptors opened by process. Or you can strace process to see all current low level syscalls. These utilities are not for monitoring, they are for real time investigation. You will need to implement proper monitoring, if you need to see also some ...


3

If you cannot change the filesystem on the production server, I would put the files on another server and mount them with NFS. I would use Linux and ZFS if man-hours are inexpensive, maybe some kind of home NAS distribution or maybe even a home NAS (both probably ZFS-based) if everything is expensive and you can find one that does professional-level ...


2

Logrotate is not a daemon/service running in the background. Logrotate is run via cron (look at /etc/crontab or somewhere in /etc/cron.d/...). You can adjust the frequency how often it is run there. However it will never do want you want, i.e. really check continuously. You will have to test how it behaves (what are the archive names, etc.) when run more ...


5

I'd seriously recommend using something like ZFS for the filesystem. Built-in tools like the ZFS snapshot and ZFS send/receive allow you to take block-level snaps of the filesystem and ship it to a second server. Some third party tools like sanoid/syncoid can set automatic management/pruning and synchronization of your filesystem from one host to another. ...


1

You can also use PcapSplitter which is part of the PcapPlusPlus package. It does exactly what you need (which is splitting pcap files by TCP or UDP connection), it's multi-platform and it doesn't have a limit on the number of connections in the original file (so you can use it to split a large pcap file containing thousands of connections or even more). The ...


0

For internet access to work behind a NAT instance, your default route in your private subnets needs to be the internal ENI of your NAT instance - see docs. Also, your NAT EC2 instance needs to have the Source/Destination Check disabled - see here. I would also make sure you have followed and understood the Amazon documentation on using a NAT EC2 instance. ...


0

This kind of looks like something important got removed with the package installation. the errors relate to policy kit. Can you confirm that polkit and dbus are both still installed? rpm -qi dbusand rpm -qi polkit logs may also contain information but seems here a policy is preventing the start of these services due to dbus not responding...because dbus is ...


0

I can't speak for the watchdog-timeout being clamped to 254 seconds but what you link to certainly explains it. Watchdog timers don't generally run in a "N failures in a row" mode though. At the first indication of error they reboot the machine so the behaviour you're seeing is how I'd expect it to work. Usually they're implemented in hardware which ...


1

The previous answer should work but thought i'd mention 'Yum-utils' can make this simpler Check what kernels are installed with: rpm -q kernel install yum utils: yum install yum-utils Package cleanup where count is how many kernels you want to retain: package-cleanup --oldkernels --count=2


0

I think your plan is overly complicated. The files you're suggesting to remove in step 2 are likely all owned by the relevant kernel package anyway. On my test RHEL 6 machine: $ rpm -qf /boot/initramfs-2.6.32-573.18.1.el6.x86_64.img kernel-2.6.32-573.18.1.el6.x86_64 etc. So step 1 should remove everything. As for what to remove, rpm -qa kernel\* will ...


1

Slight change of adams solution which doesn't break if root is logged into more than one terminals: login_info="$(who | head -n1 | cut -d'(' -f2 | cut -d')' -f1)" message="$( printf "ALERT - Root Shell Access (%s) on:\n" "$(hostname)" date echo who )" mail -s "Alert: Root Access from ${login_info}" admin <<< "${message}"


1

I would just dd the first say 8k to a file dd if=/dev/nst0 of=file.dat bs=8k count=1, then use file, or strings, or hexdump, or od, or something to examine the contents. Perhaps there is some header information that will tell you what the was used to write the tape. Otherwise it could be almost anything, and getting the information out in a way that you ...


0

I use: echo -n 02; od -t x1 -An -N 5 /dev/urandom | tr ' ' ':'


0

You need to update the apt repository info first apt-get update apt-get dist-upgrade That should do a full distribution update on Debian based systems and you'll have the latest kernel for that release. Troubleshooting If that doesn't seem to work, things in /etc/apt could be broken - such as missing or misconfigured repositories. See /etc/apt/sources....


0

I needed to convert line endings, as well as zip the file. The zip tool can do both at the same time: zip --to-crlf CRLF.zip LF.txt zip --from-crlf LF.zip CRLF.txt


-1

Try using OsSec http://ossec-docs.readthedocs.io/en/latest/index.html it notifies you about the changes to pam.d/common


1

according to the man page, in the FILES section: /etc/atoprc Configuration file containing system-wide default values. So I guess you should look there. You also have a ~/.atoprc file with your personal preferences. Maybe interesting to note, the /etc/atoprc file is not automatically created. If you install atop from EPEL repo, it does not add the atoprc ...


1

Sounds like you've suffered some sort of soft disk failure that has triggered a check/rebuild of the disks and that failure corrupted part of the dovecot installation. I would also: If possible, check the S.M.A.R.T. performance/health counters for your disks, there might be a catastrophic hardware failure imminent Verify the files of other packages using ...


0

Reinstalling dovecot packet fixed the problem: # yum reinstall dovecot # service dovecot restart Update: smart doesn't report any error.


4

If the user is going to log in, they're going to have to be able to read some bits of the file system. You simply can't launch an interactive shell without access to certain files. If all they need to do is authenticate far enough to tunnel other connections (including, as in this case, taking advantage of the ssh SOCKS proxying facility), it's better to ...


0

Could you use a chrooted ssh user or group instead? I've never implemented it myself, but it seems this may help: https://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny The tutorial is for Lenny, but hopefully this wouldn't of changed too much.


0

My best option would be Attic Backup, free and open source, written in python. https://attic-backup.org It can handle out of the box incremental backups and daily/weekly/monthly rotation all with minimum effort and a very small package. Also it does automatic backup via cron, so you will be ready in 3 minutes. Tar and rsync it's fine, but as for a simple ...


0

With POSIX awk: awk '{sub(/\r/,"")}1' CRLF.txt > LF.txt awk '{sub(/$/,"\r")}1' LF.txt > CRLF.txt


1

I like to use rsync. You can just rsync to your single backup if your goal is to have a backup if the VPS disappears, but for minimally more hard disk space you can use rsync hardlinked backups. You probably need to have a Linux system to backup to, because while rsync exists for Windows I don't think it would work with hard links.


0

All you need is tar, baby. Maybe rsync if you want to get fancy. But seriously speaking, there's a host of options that exist for network backups. Many of them are OS-dependent, though. Depending on what you need, the strategy will change. Do you only change your configurations often? Then you might do better to use a configuration management tool like ...


13

The Match address method was already mentioned, but you can also restrict the users (or groups) that are allowed to login onto a system. For instance, to limit logins to the user itai (from anywhere) and root (from a specific network), use: AllowUsers itai root@192.168.0.* This prevents all other users (like apache) from logging in through SSH. See also ...


50

Use the Match config parameter in /etc/ssh/sshd_config: # general config PermitRootLogin no # the following overrides the general config when conditions are met. Match Address 192.168.0.* PermitRootLogin yes See man sshd_config


0

Most of the things you mention just have no equivalent on a Linux system (in the sense that the concept behind this doesn't exist), but the user home directory is usually in the variable $HOME. Despite your claim to the opposite, these concepts have to clear equivalent on Linux and the feature you require does not exist.


0

I have seen issues of this nature when I have mounted a faulty or corrupted drive. If you have smartctl on the host, run it against the device (smartctl -a /dev/<device>). Different drives have different data, but look for things like: uncorrected errors, multi_zone_error_rate, current_pending_sector, raw_read_error_rate, or if it says the drive has ...


0

It really depends on how this process is started or stopped. If the process is run from a startup script, you could have it send email from the script when either happens. You could also run cron job that checks every X amount of minutes to see if the process is running, then send email. There are many different ways to accomplish this depending on your ...


0

Any time files are replaced, CSF will think that it is suspicious. Files are normally updated daily on cPanel VPSs.


0

After a CMOS reset, the system was able to install CentOS. The only thing that appears different between this blade and the others is that there is a setting for expanding the number of interrupts available to the system. On the others, it is enabled. On this one, after reset, it is now disabled and CentOS will install.



Top 50 recent answers are included