New answers tagged

0 votes

Tomcat: how to change location of manager and host-manager to a subdirectory

With Tomcat 9 (on Ubuntu/Debian) just go to the path /etc/tomcat9/Catalina/localhost and rename the manager.xml. e.g. rename it to: manager2.xml for http://example.com/manager2 subdir#manager.xmlfor ...
user avatar
  • 101
0 votes

Why am I seeing IPv6 resolve errors despite having disabled IPv6 in bind?

For Redhat Linux and its derivatives, the options should be added to /etc/sysconfig/named . To disable listening on IPv6 and use exclusively IPv4, use the following line: OPTIONS="-4"
user avatar
0 votes

"docker-compose up" as root user or non-root user?

In addition to the @BMitch's answer. The Docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can only access it using ...
user avatar
  • 101
0 votes

How can I determine which specific process/service on my CentOS box is generating excessive DNS queries?

iptables -I OUTPUT -p UDP --dport 53 -m string --algo bm --string foobar.su -j LOG --log-uid --log-prefix FOOBAR_MATCH journalctl -t kernel -f | perl -ne '/FOOBAR_MATCH/ && /SPT=(\d+)/ &&...
user avatar
  • 231
0 votes

Access wireguard using hardware Authentication like yubikey

Don't put the entire WireGuard config in your password store -- just the WireGuard private key. If you have multiple WireGuard configs, store the private key for each in a different password entry, ...
user avatar
0 votes

how to require publickey and otp, or password and otp when logging in with ssh?

If you have many other layers of security and just want this one thing for a single account/key combo, you can try this dirty hack... It is a really bad idea and you shouldn't do it. A few of the ...
user avatar
  • 1
0 votes

What time zone is a cron job using?

Unless you know a priori what time zone cron is running in, the only reliable solution is to check empirically. Otherwise, you might just be checking the time zone of your current shell environment, ...
user avatar
  • 253
1 vote

Linux / Django / Site not reachable

Judging from netstat output you provided, the process is listening on localhost interface only: tcp 0 0 >>127.0.0.1:8000<< 0.0.0.0:* LISTEN 260163/python It means that you'll be able to ...
user avatar
0 votes

ip xfrm policy template missmatch error (XfrmInTmplMismatch)

Ok, so I figured out what was happening, sort of and it was related with my environment. The decaped packet was routed goingg out my docker's eth0 only to reach the destination docker and come back ...
user avatar
0 votes

How to block internet access to certain programs on Linux

nftables can set firewall rules based on cgroups (it can be bound to each program), the syntax: socket cgroupv2 level NUM PATH PATH: 'PATH' is the one in /sys/fs/cgroup, note that the 'PATH' is ...
user avatar
  • 1
0 votes

kworker consuming +90% IO and zero disk write

Had the problem of the drive being written to every 5 secs I used the command below and found that it was x2goserver keeps running every 5 sec and trigger kworker. Note that google chrome will write ...
user avatar
0 votes

How is extra data getting into my PHP document?

If you have older copies of the site, you could run comparisons to see what changed. Risk of corruption of code is a major reason for always keeing your central code + content in a secure place. html, ...
user avatar
  • 208
0 votes

What is "-bash: !": event not found"

escape it: echo reboot your instance\! And if you ran into something when you need to use two Exclamations, use: ls *[\!'!']*
user avatar
0 votes

How can I redirect a port number on Linux?

For a really quick, temporary, swiss-army-knife utility-type solution that likely doesn't require installing anything at all: In another terminal, while already logged into the machine, open an ssh ...
user avatar
  • 103
0 votes

centos 7 php https port 443 Connection refused

From the output it looks like that nothing is being listened on port 443. If you are accessing the webserver on port 80 that is the default configuration. In order to make the webserver to listen on ...
user avatar
0 votes

Linux permission group

only problem I have is the user permissions when uploading files: "Error message from server: Permission denied". Does that mean you've accessed the server but are unable to write files? If ...
user avatar
  • 1
1 vote

Disable linux cache memory

No, you cannot disable Linux file system cache. RAM costs money and power, might as well use it. Do not use /proc/sys/vm/drop_caches in production, it will make performance worse by not using fast RAM....
user avatar
0 votes

SQLCMD command works but ODBC does not

I got it working by disabling SELinux setenforce 0 and using the following ODBC.ini [example] Driver = ODBC Driver 17 for SQL Server Server = tcp:<servername>,<port> This was on ...
user avatar
  • 25
1 vote

SQLCMD command works but ODBC does not

Port is not a valid keyword in odbc.ini on Linux for Microsoft's Linux ODBC driver. You need to specify Server = <hostname>,<port> in ODBC.ini. If you're using a dynamic port, leave the ...
user avatar
0 votes

Printer online and enabled - receives job but doesn't print

The queue name is specified by the printer, not the client. Most of the time, the name of this queue is 'lp'. So you might want to try lpadmin -p PrinterName -E -v lpd://printer_hostname/lp. If that ...
user avatar
0 votes

How to kill a telnet client with rlwrap since ^] does not work?

ctrl + q ctrl + ] Enter ctrl + q will force rlwrap to send ^] as is after you hit Enter However, it seems the command is not reliable when used with rlwrap. See for example this bare telnet session $...
user avatar
  • 252
0 votes

yum HTTP Error 403 - Forbidden behind NAT on AWS

I experienced the same issue. It was related to the policy of the s3 vpc endpoint (since we've an s3 endpoint the traffic doesn't go through the NAT). Change it to something like (adjust bucket names ...
user avatar
  • 111
0 votes

Permission denied when using kill as root

Check if you have Apparmor enabled, it can block your attempts to kill that process as non-owner.
user avatar
0 votes
Accepted

SSH permission denied

It works now. All the steps are in the question. SSH server just needed some time to process the changes. First the config: HostName 77.111.222.333 User abcd IdentityFile ~/.ssh/id_ed25519 ...
user avatar
0 votes

linux how to restart service using init

In your OS used old initd to manage daemons. It's didn't provide any watchdog functionality, so if you kill your process you should restart it manually. Use service presto restart or service presto ...
user avatar
0 votes

Why CGI is not working in apache

I do not know whether this would be something new in Apache2 on Ubuntu 20.04, but I had a problem where my executable would not start. Instead, Apache2 would offer me to download it. It took me some ...
user avatar
  • 1,972
0 votes

CentOS 7 systemctl - no feedback or status/output

Unfortunately systemctl does not provide a "verbose" option like most Unix commands do. One solution is to increase SYSTEMD_LOG_LEVEL to debug (info is useless here) and then filter the ...
user avatar
  • 327
0 votes

How to change ip address used by Zimbra zcs 8.6

Adding the last action is to change your old IP address from all relevant DNS records and relay hosts or else you may face a mail send/receive problem in spite of a fully functional Zimbra server. If ...
user avatar
0 votes

What's the default username and password for an Ubuntu Live CD?

In the latest 22.04 versions of Ubuntu, the username is the same as the computer name. The password is blank. On ISOs that use the Ubiquity installer (Ubuntu, Kubuntu, Ubuntu Budgie, Xubuntu, and ...
user avatar
0 votes

configure dnsmasq to give out addresses in different ranges

To use a tag, it needs to be set somewhere. I do this for requests relayed from another subnet: dhcp-range=set:wifi,192.168.4.0,static,255.255.255.0,24h dhcp-option=tag:wifi,option:router,192.168.4.1 ...
user avatar
0 votes

Monitor network traffic volume over interface

You can use netstat -w8 -h -i eth0 Which will display bits/sand in/out. -w8 Waits 8 seconds, -h converts output to humand readable numbers. Works in Linux/FreeBSD.
user avatar
0 votes

How to run command as user who has /usr/sbin/nologin as Shell?

All you need is sudo: sudo -u <user> -g <group> -- <command>
user avatar
0 votes

mv, rename if exists

move command rename file if file exists. Install node install -g @gauravnumber/move Example move *.jpg dirname link to repo
user avatar
0 votes
Accepted

kubernetes pod with a socket connection not firing 'close' event

In the dev environment I was simulating a severed connection by closing the client application. This was actually initiating the FIN packet sequence/ firing the 'end' event from the client. The ...
user avatar
0 votes

docker cron not working

I had the same issue too. After lots of searching and testing I came up with this solution: Be sure to install 'cron' from your Dockerfile. Then add these lines to your Dockerfile: ADD cron_start.sh /...
user avatar
0 votes

Firewalld drop by default and allow the existing rules that are in place

When using firewalld/firewall-cmd, forget all about iptables if you're running a recent Enterprise Linux (8 and above) The output from the iptables command is irrelevant and will confuse you, as it ...
user avatar
1 vote
Accepted

Why does Postgres tell me "no pg_hba.conf entry for host..." when I have already modified this file?

Per documentation, the meaning of samerole in the database column is: The value samerole specifies that the requested user must be a member of the role with the same name as the requested database. ...
user avatar
2 votes
Accepted

Why timezone setting in crontab has no effect on schedule?

There is no CRONT_TZ on debian. When you check the man page, man 5 crontab this is what you can find: The cron daemon runs with a defined timezone. It currently does not support per-user timezones. ...
user avatar
0 votes

VM: Can I detect that my virtualmachine is being paused?

No that's not possible. Once the pause is triggered, there is no delay and no process to undo the pause before it is actually paused. Not like the shutdown -h in which you get a message that the ...
user avatar
0 votes

Can not create any file in /usr/bin

@tom-yan "chattr -i /usr/bin" worked
user avatar
0 votes

See /etc/issue as parsed by agetty

This specific functionality was requested in util-linux#828. util-linux 2.35 (released 2020-01-21) introduced a flag for this: $ agetty --show-issue Debian GNU/Linux bookworm/sid tabasco tty0 $ If ...
user avatar
  • 869
0 votes

AllowGroups and Match Address for SSH

If not using user group is acceptable AllowUsers externaluser@* *@192.168.0.*
user avatar
  • 225
0 votes

How to truncate the log file size without losing recent logs?

Configure logrotate to manage your log files. What you most probably want is the copytruncate option.
user avatar
-1 votes

Can not create any file in /usr/bin

$ sudo apt-get clean $ sudo apt-get update $ sudo apt-get install --reinstall "Application" $ sudo apt-get -f install Replace application with whatever you're trying to install
user avatar
2 votes
Accepted

Default method to suppress "Connection to xxx closed." when use ssh -t?

The message is sent to stderr. ssh -t 10.192.244.104 -- pwd 2>/dev/null
user avatar
0 votes
Accepted

Unable to connect to SFTP neither using Filezilla nor PuTTY (client_loop: send disconnect: Broken pipe)

I decided to retry to create a SFTP on another VM because I was doing a new dev environment and had the same issue. I fixed the issue giving the good permissions in the home directory of the sftp user ...
user avatar
  • 1
1 vote

Virtualbox / Vagrant "closed by remote host" during routine use

Referring to the other answers here: Yes, it seems to be the RAM. I've just had a similar issue with a freshly created Fedora vagrant environment on VirtualBox. When trying to do something like "...
user avatar
1 vote
Accepted

Can I force a custom DNS server for OpenVPN clients, without forced traffic redirection?

Since your DNS server have ip address 10.8.0.1, this option would solve your question. push "dhcp-option DNS 10.8.0.1" BUT Since this is the same VM as OpenVPN the right answer might be ...
user avatar
1 vote

Can I force a custom DNS server for OpenVPN clients, without forced traffic redirection?

Try the following options in your server profile (/etc/openvpn/server.conf): push "dhcp-option DOMAIN your_domain.com" push "dhcp-option ADAPTER_DOMAIN_SUFFIX your_domain.com" push ...
user avatar
  • 86
10 votes
Accepted

How does dmesg differentiate between different log levels?

The dmesg(1) command does not read the /var/log/dmesg file, rather, it reads /dev/kmsg which contains the necessary syslog facility and priority information.
user avatar
  • 114k

Top 50 recent answers are included