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
Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Embarassingly, tcpdump started showing the stuff every 10 seconds after fiddling around...not sure what I did.


Cidrick posted:

Is InfluxDB configured to accept collectd metrics? It won't natively, and I don't see a collectd output plugin to write to InfluxDB, just OpenTSDB and graphite, among other things.

Also check if InfluxDB is listening on all interfaces, or on your eth0 or equivalent, instead of the loopback interface; what's the output of "ss -tln?"



InfluxDB has a native way to accept collectd metrics.

I edited the [[collectd]] section of influxdb.conf to look like:
code:
[[collectd]]
  enabled = false
  bind-address = ":25826"
  database = "collectd"
  typesdb = "/usr/share/collectd/types.db"

  # These next lines control how batching works. You should have this enabled
  # otherwise you could get dropped metrics or poor performance. Batching
  # will buffer points in memory if you have many coming in.

  batch-size = 1000 # will flush if this many points get buffered
  batch-pending = 5 # number of batches that may be pending in memory
  batch-timeout = "1s" # will flush at least this often even if we haven't hit buffer limit
  read-buffer = 0 # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
To be clear this is now the problem:

code:
>> influx
Visit [url]https://enterprise.influxdata.com[/url] to register for updates, InfluxDB server management, and monitoring.
Connected to [url]http://localhost:8086[/url] version 0.13.0
InfluxDB shell version: 0.13.0
> use collectd
Using database collectd
> show measurements
>
Nothing in the db despite the fact that tcpdump shows a bunch of packets every 10 seconds.

Thermopyle fucked around with this message at 00:09 on Aug 13, 2016

Adbot
ADBOT LOVES YOU

Cidrick
Jun 10, 2001

Praise the siamese

Thermopyle posted:

InfluxDB has a native way to accept collectd metrics.

Well egg on my face. Ignore me I guess!

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Cidrick posted:

Well egg on my face. Ignore me I guess!

Well hopefully there's enough egg to go around.

That config file obviously says "enabled=False".

Sometimes I'm so dumb.

other people
Jun 27, 2004
Associate Christ

taqueso posted:

I ran across a bug in Fedora 24 where I had typed my password into the xlock (or whatever is used to lock X) textbox, but got distracted before actually finishing. When the monitor turned off I noticed and hit enter. When the password screen reappeared my password was shown as plain text instead of dots. The effect stayed around through a couple wrong passwords but it was fine after the next screen lock. I was excited to make a bug report but now I can't replicate it.

If you right click on the password input box there is an option to show password text. I manage to enable it more often than I'd like by doing something with the right alt or ctrl key. I bet you did the same.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Kaluza-Klein posted:

If you right click on the password input box there is an option to show password text. I manage to enable it more often than I'd like by doing something with the right alt or ctrl key. I bet you did the same.

Looks like ctrl-enter brings it up.

dpkg chopra
Jun 9, 2007

Fast Food Fight

Grimey Drawer
I'm running a CentOS 7 home server. It doesn't host anything critical that can't stand a little downtime.

Should I be automatically updating overnight or something like that?

If so, what's the best way to do that? A cronjob that runs yum update -y ?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Another collectd/influxdb/grafana question:

The Disk plugin for collectd is supposed to report "the number of octets written to and read from a disk or partition, the number of read/write operations issued to the disk and a rather complex "time" it took for these commands to be issued".

So, I set up grafana like so:


Which gets me a graph that looks like this:



This is a steadily increasing graph no matter which time scale I zoom to.

I'm expecting a graph that looks like this from the collectd wiki (obviously this is RRDTool, but I'm referring to ups and downs in the data):



This is confusing to me, so I go to look at the raw data in InfluxDB:

code:
> SELECT value FROM disk_read WHERE type = 'disk_octets' AND instance = 'sdt' AND time > now() - 60s
name: disk_read
---------------
time                    value
1471127878779610000     2.4178681856e+11
1471127888773879000     2.41786834944e+11
1471127898773685000     2.41786851328e+11
1471127908774471000     2.41786875904e+11
1471127918773935000     2.4178692096e+11
1471127928774015000     2.4178706432e+11
 
Those are steadily increasing values!

So apparently, I'm not understanding what the disk_octets is supposed to represent? How do I get a graph or data like that RRDTool graph above?

Wicaeed
Feb 8, 2005
Maybe it needs to be calculated as a delta between values rather than a steadily increasing time series, somewhat similar to an interface speed statistic.

jre
Sep 2, 2011

To the cloud ?



Thermopyle posted:

Another collectd/influxdb/grafana question:

The Disk plugin for collectd is supposed to report "the number of octets written to and read from a disk or partition, the number of read/write operations issued to the disk and a rather complex "time" it took for these commands to be issued".

So, I set up grafana like so:


Which gets me a graph that looks like this:



This is a steadily increasing graph no matter which time scale I zoom to.

I'm expecting a graph that looks like this from the collectd wiki (obviously this is RRDTool, but I'm referring to ups and downs in the data):



This is confusing to me, so I go to look at the raw data in InfluxDB:

code:
> SELECT value FROM disk_read WHERE type = 'disk_octets' AND instance = 'sdt' AND time > now() - 60s
name: disk_read
---------------
time                    value
1471127878779610000     2.4178681856e+11
1471127888773879000     2.41786834944e+11
1471127898773685000     2.41786851328e+11
1471127908774471000     2.41786875904e+11
1471127918773935000     2.4178692096e+11
1471127928774015000     2.4178706432e+11
 
Those are steadily increasing values!

So apparently, I'm not understanding what the disk_octets is supposed to represent? How do I get a graph or data like that RRDTool graph above?

Collectd is producing an ever increasing counter rather than a gauge.

So you need to apply a derivative function to it.
https://docs.influxdata.com/influxdb/v0.8/api/aggregate_functions/#derivative

Nulldevice
Jun 17, 2006
Toilet Rascal

Wicaeed posted:

I've got a fairly large live dataset (~150TB) that I need to slowly move Amazon S3.

If I use a tool like rsync (or rclone to get it directly to an S3 bucket), what happens when some data gets added to the set (or removed). Does rsync/rclone know what changed on the source side and update the corresponding data on the destination side, or would I have to make another run in order to see that data get updated?

I've never really had to do something like this before and feel like I'm swimming in the dark trying to figure out the proper way to do this.

Both rsync and rclone will only push changed data if you tell them to. I use rclone with amazon cloud drive to back up my files, and the sync function works fine. I also use rsync for local backups to another server using the archive option and the delete option to delete changes on the receiving side, so basically if a file no longer exists on the source, it removes it on the receiving side. I'm also using the '--link-dest' option on rsync to perform differential backups, so i end up with a hard linked folder on the receive side with the changes in it, plus the original files. The actual directory size is only as big as the data pushed, but once that backup is pushed to the top of the rotation (automatically deletes older than 10 days) it becomes as big as the dataset if that makes any sense.

This is what the set ends up looking like:

code:
5.9T	backup2016-08-03
3.9M	backup2016-08-04
3.9M	backup2016-08-05
3.9M	backup2016-08-06
20G		backup2016-08-07
3.9M	backup2016-08-08
2.2G	backup2016-08-09
3.9M	backup2016-08-10
12G		backup2016-08-11
7.4G	backup2016-08-12
98G		backup2016-08-13
13G		backup2016-08-14
This way if something gets horribly hosed up, I can pull the library from any point in time from up to ten days back. If you can use rsync with S3 this is probably the best way to do it instead of a direct sync, that way you don't sync up bad data and lose an otherwise good set. I don't think rclone has this function.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

jre posted:

Collectd is producing an ever increasing counter rather than a gauge.

So you need to apply a derivative function to it.
https://docs.influxdata.com/influxdb/v0.8/api/aggregate_functions/#derivative

Well dang, that's exactly what I need. Thanks.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I use byobu to manage my ssh sessions. One of its indicators shows how many packages are available for upgrading on an Ubuntu system.

I just realized that it doesn't show this anymore until after I manually run apt-get update. After I do that, then the indicator shows that there are available packages. It used to just show the indicator automatically.

As I don't think I've ever had any cron job or anything running apt-get update, I assume Ubuntu has some built-in mechanism for running this command or something like it that somehow got turned off.

Anyone know what got turned off?

Mao Zedong Thot
Oct 16, 2008


Thermopyle posted:

I use byobu to manage my ssh sessions. One of its indicators shows how many packages are available for upgrading on an Ubuntu system.

I just realized that it doesn't show this anymore until after I manually run apt-get update. After I do that, then the indicator shows that there are available packages. It used to just show the indicator automatically.

As I don't think I've ever had any cron job or anything running apt-get update, I assume Ubuntu has some built-in mechanism for running this command or something like it that somehow got turned off.

Anyone know what got turned off?

I don't know what the actual running mechanism is, but it's a setting in `Software & Updates`: http://farm8.staticflickr.com/7435/10955425153_b866a08bec_z.jpg

Xik
Mar 10, 2011

Dinosaur Gum
I was hoping someone could point me in the right direction so I can try and debug an audio issue? Running Debian/Gnome/Pulse.

If I plug my headphones into the front headphone port on my case which uses the audio header pinouts on the motherboard, everything is perfect. When there is nothing playing, there is no sound/no background noise. This is what alsamixer looks like when I use that headphone port:



If I use the rear line out port on the same motherboard (not a separate sound card), I get all sorts of lovely background noise. If I open up alsamixer and play with the different channels, I can "solve" half of it.



The default state when I plug my headphones into the rear line out port is that I get two type of background noise. One sounds like when you put a sea shell up to your ear, the other is harder to explain, it's just the "sound of silence/interference". Like when you hook up big speakers to a stereo and put the volume to max without playing anything. If I unmute "Line" and leave it at zero the "Sea" noise is gone, mute it and it's back again. The second background noise I can't get rid of unless I completely mute master.

I considered hardware interference for the second background noise but it wasn't an issue when I had to run Win 10 for a while.

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!
Are you sure it's not a hardware issue? Could be that the rear audio ports are not isolated as well as the front ports?

telcoM
Mar 21, 2009
Fallen Rib

Xik posted:

If I use the rear line out port on the same motherboard (not a separate sound card), I get all sorts of lovely background noise. If I open up alsamixer and play with the different channels, I can "solve" half of it.

You seem to have the surround/center/LFE/side channels enabled too. If you're using headphones in the line out port, these should be unnecessary - have you tried setting them to zero and/or muting them?



Also, would the Auto-Mute or Loopback settings near the right side of the mixer have any noticeable effect at all?

Xik posted:

The default state when I plug my headphones into the rear line out port is that I get two type of background noise. One sounds like when you put a sea shell up to your ear, the other is harder to explain, it's just the "sound of silence/interference". Like when you hook up big speakers to a stereo and put the volume to max without playing anything. If I unmute "Line" and leave it at zero the "Sea" noise is gone, mute it and it's back again. The second background noise I can't get rid of unless I completely mute master.

The HD-Audio standard allows all kinds of audio signal mixers, and relies on some information embedded in the system firmware to identify how to operate the audio mixer in this particular hardware implementation. It is possible that this information is slightly incorrect in your firmware, and the manufacturer has just provided a workaround in the Windows driver since it's easier to update.

Such an error could possibly cause the audio mixer chip to enable some physical signal line in the audio chip that is neither actually used nor properly terminated in your motherboard model. Such a line could easily pick up PSU hum and other interference from all the high-frequency electrical activity that happens within the computer chassis. That is fixable with a model-specific "quirk" setting, but tracking down the right fix might require contacting some Linux audio driver guru like Takashi Iwai.

If you're interested, https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/sound/pci/hda lists recent developments in the Linux HD-Audio driver: it's mostly model-specific tweaks.

Another possibility: you said your headphones are connected to the rear Line Out port. In a 7.1 surround set-up, the "Line Out" actually includes several plugs: green for the primary/front speakers, then three more plugs: one for rear surround pair, another for center+LFE (completing the 5.1 surround set) and one more for side speakers for full 7.1. The blue port is usually switchable or Line *In*. The mixer slider controlling the green port would be the one named "Front"- not because it's related to anything at the front of the chassis, but because it feeds the front speakers. If the blue connector is Line In, then the Line slider in the Playback side might actually control the mixing of the Line In signal into the computer-generated output (PCM).

If that's true, you would certainly want to keep the Line slider at zero unless you actually have something connected to the Line In connector. You'll also want to switch the mixer into Capture mode and ensure that all the capture channels that you're not actually using are set to zero and muted, to minimize any sources of incoming noise to the audio chip.

The Loopback setting in the mixer seems to be a common cause of noise in modern HD-Audio sound chips, and it seems that the Linux default setting for it was changed to Off in a patch submitted in early June.

22 Eargesplitten
Oct 10, 2010



I'm looking at installing Fedora. From what I can see, the partitions necessary don't include a general storage partition. Can I just use the files on my Windows partition if I dual-boot? Or do I need a separate storage partition?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

22 Eargesplitten posted:

I'm looking at installing Fedora. From what I can see, the partitions necessary don't include a general storage partition. Can I just use the files on my Windows partition if I dual-boot? Or do I need a separate storage partition?

How come you want to dual-boot? Can a VirtualBox VM running Fedora suffice for your needs?

22 Eargesplitten
Oct 10, 2010



I'm not sure if I even want to dual-boot, I just would like to not have to transfer my current stuff to my dicey external and back. A VM might be okay, but one of the people in the working in IT threads said that setting up a laptop with full functionality on Linux was the best way to learn about Linux.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

22 Eargesplitten posted:

I'm not sure if I even want to dual-boot, I just would like to not have to transfer my current stuff to my dicey external and back. A VM might be okay, but one of the people in the working in IT threads said that setting up a laptop with full functionality on Linux was the best way to learn about Linux.

If you just want to learn about Linux, a VM is absolutely perfect for that. You don't have to worry about screwing up your host machine messing with dual booting. You can save snapshots of the VM, mess around and break poo poo, and then just restore the last good snapshot. Performance in the VM is on par with host machine.

22 Eargesplitten
Oct 10, 2010



Okay, I guess I'll set that up. Using VMs also seems like a good job skill.

How much space does the VM generally take on the hard drive? I'm running a 180gb SSD, so I don't have a ton of space.

bobfather
Sep 20, 2001

I will analyze your nervous system for beer money
I have (in Hyper-V) CentOS minimal configured with a LEMP stack running a minimal Wordpress install, and it's taking up less than 3GB. Each snapshot is 300 MB or less.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

22 Eargesplitten posted:

Okay, I guess I'll set that up. Using VMs also seems like a good job skill.

How much space does the VM generally take on the hard drive? I'm running a 180gb SSD, so I don't have a ton of space.

Using VMs is an excellent job skill to pick up. Once you've figured out how to manually create the VM, install an OS on it, etc then you should check out Vagrant and how it can help you make that process way easier. Do it at least once without Vagrant though.

You can pick the size of the disk but I've found 8GB is usually plenty of room to play around with stuff. If you need additional storage, you can always add more virtual disks or resize the existing disk. You can also setup "shared folders" between your host and virtual machine, so you can give the VM access to anything stored elsewhere on your host machine.

Xik
Mar 10, 2011

Dinosaur Gum

telcoM posted:

Bunch of great info.

Thanks telcoM, I really (like really, really) appreciate that you took the time to explain.

telcoM posted:

Also, would the Auto-Mute or Loopback settings near the right side of the mixer have any noticeable effect at all?

telcoM posted:

The Loopback setting in the mixer seems to be a common cause of noise in modern HD-Audio sound chips, and it seems that the Linux default setting for it was changed to Off in a patch submitted in early June.

Loopback mixing appears to be the cause of the issue, if I flip it to disabled, all my audio related problems are gone. This is the commit you mentioned, it looks like it's going to be set to disabled by default going forward.

commit message posted:

So far, we enabled the loopback mixing control as default, as this behavior made somewhat compatible with the earlier HD-audio drivers for Realtek & co. However, it's getting annoying as we've got more and more bug reports about the noise coming from the loopback route. Since the loopback mixing is used fairly rarely and often harmful (e.g. using PA), let's get rid of the default turn-on lines.

Bold mine, looks like this was generating a lot of bug reports for lovely audio.

telcoM posted:

You seem to have the surround/center/LFE/side channels enabled too. If you're using headphones in the line out port, these should be unnecessary - have you tried setting them to zero and/or muting them?
Just to answer this in case you're curious. I did indeed try different combinations of volume levels/mute state for the various channels, but it all gets reset to "on and max volume" as soon as the volume is adjusted using pulse audio (basically any desktop app or the gnome volume control).

ToxicFrog
Apr 26, 2008


22 Eargesplitten posted:

Okay, I guess I'll set that up. Using VMs also seems like a good job skill.

How much space does the VM generally take on the hard drive? I'm running a 180gb SSD, so I don't have a ton of space.

With modern VM technology, only as much space as is actually used -- you can tell the VM that it has an 80GB HDD, but if the OS install only takes up 5GB, that's how much space it'll take on disk.

If you're really concerned you can check out something space-optimized like TinyCore (<100MB for a full install), but even something like SUSE will only take a few gigabytes for a standard install.

Also, while I agree that a VM is a good way to go here, this:

22 Eargesplitten posted:

I'm not sure if I even want to dual-boot, I just would like to not have to transfer my current stuff to my dicey external and back.

isn't really a concern, since you can just resize the existing partitions on disk without losing the data in them and install linux in the newly freed space; there's no need to completely wipe the disk.

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

ToxicFrog posted:

With modern VM technology, only as much space as is actually used -- you can tell the VM that it has an 80GB HDD, but if the OS install only takes up 5GB, that's how much space it'll take on disk.
The corollary to this is that you can tell a dozen VMs that they each have 50TB of storage, and put them all on your 180GB SSD, and thin provision those VM disks so that they expand onto your SSD as the VM writes to it, but you should absolutely not do that thing.

ewe2
Jul 1, 2009

telcoM posted:

The Loopback setting in the mixer seems to be a common cause of noise in modern HD-Audio sound chips, and it seems that the Linux default setting for it was changed to Off in a patch submitted in early June.

Thanks for this as well, I didn't even know it was toggleable, and great news about the patch. I have an ALC887-VD on an ASUS board, and like Xik, you can't do anything with the surround/centre/lfe channels except turn them off which mutes master. I'm guessing that's a software switchable thing more useful in a windows driver environment, because it acts the same in ALSA even if you are working in a 2ch setting.

Michaellaneous
Oct 30, 2013

I have a server connected with 2 cables to my gateway, both in different VLANS. All Forwarding is blocked via iptables. But when I disconnect one cable, the machine can still ping both interfaces? What?

telcoM
Mar 21, 2009
Fallen Rib

Michaellaneous posted:

I have a server connected with 2 cables to my gateway, both in different VLANS. All Forwarding is blocked via iptables. But when I disconnect one cable, the machine can still ping both interfaces? What?

There are two possible design principles in TCP/IP driver stacks, known as host models.

With the strong host model, each interface will only accept unicast packets with an IP address belonging to that specific interface, which is what you are expecting.

However, Linux default behavior is the weak host model, where each interface will accept unicast packets sent to any IP address that belongs to the host. As a result, if a packet comes in via the "wrong" interface, it will still get responded.

It is possible to make Linux behave according to the strong host model, if necessary, but it may require multiple settings, depending on the topology of your network.
At the very minimum, you'll need to set the rp_filter sysctl, and possibly some iptables rules to explicitly drop any unicast packets that don't match the address of the network interface. You may also need to add a few advanced routing rules to make the routing code use the source IP address as part of the routing decision: in effect, you'll need to provide each network interface with a separate routing table.

Michaellaneous
Oct 30, 2013

telcoM posted:

There are two possible design principles in TCP/IP driver stacks, known as host models.

With the strong host model, each interface will only accept unicast packets with an IP address belonging to that specific interface, which is what you are expecting.

However, Linux default behavior is the weak host model, where each interface will accept unicast packets sent to any IP address that belongs to the host. As a result, if a packet comes in via the "wrong" interface, it will still get responded.

It is possible to make Linux behave according to the strong host model, if necessary, but it may require multiple settings, depending on the topology of your network.
At the very minimum, you'll need to set the rp_filter sysctl, and possibly some iptables rules to explicitly drop any unicast packets that don't match the address of the network interface. You may also need to add a few advanced routing rules to make the routing code use the source IP address as part of the routing decision: in effect, you'll need to provide each network interface with a separate routing table.

Okay that is actually quite interesting. Thank you for that writeup.
Which brings me to my actual problem: The OpenStack installiation. I want to seperate the both network (Administrative and Provider). Everything is connect to a switch and put into two seperate VLANs.

I planned for both networks to have their own dns zone and DHCP. But clients in the Admin network (10.0.1.0) recieve get put into the Provider network (192.168.1.0).

Is there a way I can only supply DHCP on a single interface?

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

Michaellaneous posted:

Okay that is actually quite interesting. Thank you for that writeup.
Which brings me to my actual problem: The OpenStack installiation. I want to seperate the both network (Administrative and Provider). Everything is connect to a switch and put into two seperate VLANs.

I planned for both networks to have their own dns zone and DHCP. But clients in the Admin network (10.0.1.0) recieve get put into the Provider network (192.168.1.0).

Is there a way I can only supply DHCP on a single interface?
Yes, you can bind the DHCP server to respond to any requests that come in to a specific address, or to any requests that come in on a specific interface.

evol262
Nov 30, 2010
#!/usr/bin/perl

Michaellaneous posted:

Okay that is actually quite interesting. Thank you for that writeup.
Which brings me to my actual problem: The OpenStack installiation. I want to seperate the both network (Administrative and Provider). Everything is connect to a switch and put into two seperate VLANs.

I planned for both networks to have their own dns zone and DHCP. But clients in the Admin network (10.0.1.0) recieve get put into the Provider network (192.168.1.0).

Is there a way I can only supply DHCP on a single interface?

What are you actually doing here? Can you describe your enviroment (how many hosts? are the "clients" instances?)

Is there a reason you're not using Neutron and network namespaces?

EconOutlines
Jul 3, 2004

Does anyone have any recommendations for learning Linux Server, specifically Ubuntu? After upgrading from 14.04 to 16.04, I'm realizing I sorely lack the fundamental base of linux coming from windows.

Up until now, most of my work with my VPS(ZNC, another test one), have mainly been Googling for commands to plug into PuTTY via SSH, but I really don't really understand the various system commands, folder locations/purposes, etc. Kind of pieced together.

Video tutorials are nice, so are books. Anything that helps my understand the language/method of thought. For example, I have no idea how systemd is different than init, etc.

Mao Zedong Thot
Oct 16, 2008


EconOutlines posted:

Does anyone have any recommendations for learning Linux Server, specifically Ubuntu? After upgrading from 14.04 to 16.04, I'm realizing I sorely lack the fundamental base of linux coming from windows.

Up until now, most of my work with my VPS(ZNC, another test one), have mainly been Googling for commands to plug into PuTTY via SSH, but I really don't really understand the various system commands, folder locations/purposes, etc. Kind of pieced together.

Video tutorials are nice, so are books. Anything that helps my understand the language/method of thought. For example, I have no idea how systemd is different than init, etc.

Depends on what you're trying to learn, really. Linux is *giant*, even if you just consider the core of kernel + basic userland + distribution tools. It gets a whole lot bigger if you include services/servers, running your own services, etc. I'd recommend setting some goals and working towards them specifically.

Things like Wikipedia (https://en.wikipedia.org/wiki/Unix_filesystem#Conventional_directory_layout) + arch wiki (https://wiki.archlinux.org/index.php/systemd) are pretty good for summarization information.

Sheep
Jul 24, 2003
https://linuxjourney.com/

EconOutlines
Jul 3, 2004

so loving future posted:

Depends on what you're trying to learn, really. Linux is *giant*, even if you just consider the core of kernel + basic userland + distribution tools. It gets a whole lot bigger if you include services/servers, running your own services, etc. I'd recommend setting some goals and working towards them specifically.

Thanks, I figured it be something along those lines. I'm still working on *goals*, its just all the small random things such as figuring out to put the public key in a user's '~/.ssh/authorized_keys' file even though it was added to the system as root, for example.

The site that Sheep suggested looks pretty good as well. Guess I'll keep plugging away.

Mao Zedong Thot
Oct 16, 2008


EconOutlines posted:

Thanks, I figured it be something along those lines. I'm still working on *goals*, its just all the small random things such as figuring out to put the public key in a user's '~/.ssh/authorized_keys' file even though it was added to the system as root, for example.

The site that Sheep suggested looks pretty good as well. Guess I'll keep plugging away.

.authorized_keys should be user owned, btw :) (so should priv + pub keys too -- maybe I'm misunderstanding you)

Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.

EconOutlines posted:

Thanks, I figured it be something along those lines. I'm still working on *goals*, its just all the small random things such as figuring out to put the public key in a user's '~/.ssh/authorized_keys' file even though it was added to the system as root, for example.

The command 'apropos' may be helpful in figuring out random things. For example 'apropos authorized_keys' might give you the man-page for 'ssh-copy-id' and on that man-page the Notes-section would explain the permissions issue so loving future mentioned.

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

anthonypants posted:

I would like to use postfix as an internal relay to forward unauthenticated SMTP mail to Office 365. Because O365 requires authentication, I'd like to rewrite the sender address from baduser@domain.local to something like relay+baduser@domain.com. Assuming that's even a valid from: address, postfix doesn't seem to be translating it. I've got a map file:
code:
/(.*?)@domain.local/ relay+$1@domain.com
and my main.cf has
code:
smtp_generic_maps = pcre:/etc/postfix/generic
and postmap -q "baduser@domain.local" pcre:/etc/postfix/generic even returns relay+baduser@domain.com. What am I missing?


e: I don't know why, but what I needed to use instead of generic maps was sender_canonical_maps.
main.cf:
code:
sender_canonical_maps = pcre:/etc/postfix/sender_canonical
sender_canonical:
code:
/(.*?)@domain.local/ relay+$1@domain.com
And it works! :toot:
ee: But Office 365 doesn't allow plus signs in email addresses! gently caress you, Microsoft!
So I have the sender_canonical file to just be /.*/ relay@domain.com, and that worked for telnet connections, but it wasn't enough for pretty much anything else. So, I had to add header_checks = pcre:/etc/postfix/header_checks to my main.cf, with /From:.*/ REPLACE From: relay@domain.com. If I could still do sub-addressing, I could probably use one of the above regex strings, but I can't, so this is good enough.

Now, what I'd like to do is prepend the sender (or something) to the subject line, based who the sender is (before it gets replaced), and I'm not sure what the best method is. I tried doing something like /From: (.*)/ PREPEND Subject: $1 but that doesn't work that way. I think I could make a unique header, and then have Office 365 deal with the sender/recipient, buuuuut I can only match the From: field once.

Adbot
ADBOT LOVES YOU

fuf
Sep 12, 2004

haha

EconOutlines posted:

Does anyone have any recommendations for learning Linux Server, specifically Ubuntu? After upgrading from 14.04 to 16.04, I'm realizing I sorely lack the fundamental base of linux coming from windows.

Up until now, most of my work with my VPS(ZNC, another test one), have mainly been Googling for commands to plug into PuTTY via SSH, but I really don't really understand the various system commands, folder locations/purposes, etc. Kind of pieced together.

Video tutorials are nice, so are books. Anything that helps my understand the language/method of thought. For example, I have no idea how systemd is different than init, etc.

I've found it surprisingly hard to find good books on linux. It's hard even to get recommendations from experts (presumably because most experts learnt through training / jobs rather than through books).

Most of them suffer from the same problem as a lot of technical books: they tell you how to use specific commands (this is how you use "less", this is what you can do with "sed", etc.) without ever really stepping back and talking about why you might need to use those commands, or what is actually going on when those commands are invoked.

It's frustrating because learning about how linux does things, the interesting histories and the elegant little rationales for various behaviour is a big part of the appeal of linux (for me). I want some theory and explanation, not just a user manual.

I've only just started it, but "How Linux Works" by Brian Ward seems pretty good so far.

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