Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
DizzyBum
Apr 16, 2007


Trying to track down some spammer that managed to guess a user's e-mail password on a dedicated server. (With servers like this, there's always inevitably someone that sets their password as "password" or their own username.) What can I use to help track down the source faster? I just want to see which user got compromised and/or the IP address of the spammer.

By cross-referencing all the info I have, I'm sure I can find them, but I'm trying to think of other sources of info other than the following:

- Sendmail log files (doesn't show which user account is making an SMTP connection, only POP/IMAP logins and where outgoing e-mails are being sent)
- /proc directory (not really enough information)
- ps aux (doesn't really get me anywhere)
- netstat anp (shows all active connections, but there's plenty of connections on port 25 to sift through since it's a busy server)

Any help is appreciated.

Adbot
ADBOT LOVES YOU

DizzyBum
Apr 16, 2007


Where can I find successful SMTP login attempts in the log files on an older Fedora 6 server? Any sort of identifying string I can use? The server's running Sendmail.

DizzyBum
Apr 16, 2007


Say I want to write a little shell script that tells a user what quotas on a server are above a certain percentage. I don't really have a problem writing it, but what I get stuck on is: where do I actually PUT the script? Obviously I can put it anywhere on the server the user has access to run scripts from, but where should I put it? Is there a standard for this sort of thing?

DizzyBum
Apr 16, 2007


What's the usual method for permanently blocking an IP address from a server? Adding it to iptables or the kernel routing table is great but I need it to persist after a reboot.

DizzyBum
Apr 16, 2007


JHVH-1 posted:

A distro like redhat/centos has default iptables rules /etc/sysconfig/iptables that you can add it to. If your distro doesn't use that, then you can stick a file with rules in /etc/iptables.rules or whatever you want to call it. Just run iptables-save /etc/iptables.rules. Then put 'iptables-restore /etc/iptables.rules' in /etc/rc.local or make a proper rc script.

Basically read your distro's documentation to find out how they expect to do it and set it up.

That's handy. Thanks!

DizzyBum
Apr 16, 2007


Is there a way to easily find what IPs are already in use in an Apache virtualhosting environment? The /etc/virtualhosting/ipranges file shows the IPs bound to virtualhosting but doesn't say which ones are already taken.

DizzyBum
Apr 16, 2007


I'm making a small bash script to help unarchive old mail files on a server. The file format is always:

username.oldmail.YYYYMMDD.gz

So I want to pull out the username from that string. But I still have to account for the fact that '.' is a valid character for usernames, so I can't just say "cut at the first period" and have it work 100% of the time. I basically just want to capture the part of the string before '.oldmail.YYYYMMDD.gz'. Is there an easy way to do that in bash? ('.' is a valid character for usernames on this server as well.)

DizzyBum
Apr 16, 2007


covener posted:

code:
$ FOO=user.name.oldmail.YYYYMMDD.gz
$ echo ${FOO/\.oldmail.*/}
user.name
$ echo $FOO | sed -e 's/\.oldmail.*//'
user.name

Okay, that was a lot easier than I thought it would be. Thanks!

DizzyBum
Apr 16, 2007


Is there any way to use Pine to open a specific user's mailbox while you're root? The user doesn't have shell access so I can't su or chroot.

DizzyBum
Apr 16, 2007


I've been having issues with NRPE timeouts from a Nagios check we have running. Apparently netstat is being called in the check script and taking almost 30 seconds to finish, while NRPE is configured to timeout in 20. So I did some reading and learned about ss. Tested the script with ss in place of netstat... :stare: Holy poo poo, it does in 1 second what netstat did in 30.

Is there some downside to using ss over netstat that I should know about? Have I just been living in the stone age all this time? This feels too good to be true.

DizzyBum
Apr 16, 2007


I posted this in the Raspberry Pi thread but I figured I could also ask here...

I've got a Pi 3 running Raspbian that I'm using for a few different applications. What I want to do is create a very simple GUI frontend for the Pi, so when Raspbian boots up it'll display a menu so I can choose whatever script I want to run. I'd like to be able to select and choose using CEC via my TV remote.

Somebody has to have done this something like this already. Any ideas?

DizzyBum
Apr 16, 2007


I'm playing around with building dashboards on a Raspberry Pi. I'm using a stripped-down raspbian-lite install with LXDE manually installed.

So far I've managed to get a Chromium window to automatically open on boot with no window decorations. I can use Kiosk mode if I go fullscreen (this hides the tabs and address bar like fullscreen mode) but I want to be able to set the window size and position (think "borderless window" mode like in lots of PC games) because then I can configure window placement via a single file. "App mode" doesn't do this. Apparently Chrome used to have a Compact Mode that did exactly this, but it was taken out many years ago.

Is there a way to hide the tabs and address bar in Chromium without going fullscreen, or is there another browser I could try that supports this feature more easily?

DizzyBum
Apr 16, 2007


evol262 posted:

Just embed Chromium. A 10 line Electron app could do this

I've never heard of Electron before this; looking into it now. Have any good resources?

DizzyBum
Apr 16, 2007


evol262 posted:

Electron is basically "make web applications appear to be desktop applications by embedding Chromium into its own window, and give Javascript some easy UX bindings for desktop applications".

You can follow the official tutorial, or this, which is basically the code from it. Replace "mainWindow.loadURL(format..." with "mainWIndow.loadURL("http://...")" and you're 90% there.

Then create a frameless window of the correct size.

Spotify, Slack, and a number of other applications are Electron now to ease development of a unified web/mobile/desktop experience.

Volguus posted:

I never thought i'd see it, but this is a perfect example where an Electron based application actually makes sense. The only worry i'd have about it would be if the memory on the poor Pi would be enough.
One additional slight change on the tech stack I'd make would be openbox/fluxbox over lxde as they are slightly bit smaller.

Yeah, this is exactly what I needed. I'm gonna play around with this and see what sticks. Thanks a lot!

DizzyBum
Apr 16, 2007


If my wife came up to me and said she wanted Linux on her laptop, I'd use Ubuntu.

Also I'd check to make sure she wasn't being mind-controlled.

Adbot
ADBOT LOVES YOU

DizzyBum
Apr 16, 2007


Is there a way to dynamically control GPU fan speed in Linux? Specifically it's for an RTX 4070 Super. I can manually set the fan speeds using the NVIDIA control panel, but I'd rather set an actual fan curve instead of just having it on jet engine mode during heavy load times.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply