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
poverty goat
Feb 15, 2004



hifi posted:

You can use "sudo service lightdm restart" (if you use something other than the default unity desktop then you have to figure out which display manager you are using and restart that service instead) but this isn't a suitable alternative to fixing the underlying problem.

don't tell me what's suitable :colbert:

you're right though, also this just dumps me back out at a black screen so back to the drawing board I guess

Adbot
ADBOT LOVES YOU

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

gggiiimmmppp posted:

so back to the drawing board I guess

File a bug with Canonical and stop using Unity.

poverty goat
Feb 15, 2004



evol262 posted:

File a bug with Canonical and stop using Unity.
I suspect that f.lux was the culprit so I nuked it and so far so good. F.lux made sense when I first set things up and was dicking around with it alongside my windows machine with synergy but now I only turn on the monitor every few weeks when I want to poke at something in virtualbox so whatever. Maybe I'll install lxde and free up some memory

poverty goat fucked around with this message at 00:57 on Aug 5, 2014

Hollow Talk
Feb 2, 2014

gggiiimmmppp posted:

I suspect that f.lux was the culprit so I nuked it and so far so good. F.lux made sense when I first set things up and was dicking around with it alongside my windows machine with synergy but now I only turn on the monitor every few weeks when I want to poke at something in virtualbox so whatever. Maybe I'll install lxde and free up some memory

If you still want something like f.lux but suspect that it caused problems, have a look at redshift which does something similar and which has been working flawlessly for me for years: http://jonls.dk/redshift/

YouTuber
Jul 31, 2004

by FactsAreUseless

Hollow Talk posted:

If you still want something like f.lux but suspect that it caused problems, have a look at redshift which does something similar and which has been working flawlessly for me for years: http://jonls.dk/redshift/

Oh man, I totally forgot about F.lux and Redshift. That initial color shift is a bitch when it goes from white background to some parchment looking stuff.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Puppet questions:

How do I get the puppet nginx module to use an nginx package that has SPDY enabled? Do I have to build the deb myself?

How come some modules support hiera and some do not?

What's the difference between include nginx and class { 'nginx': }?

Why does puppet seem so much more confusing than chef?

fletcher fucked around with this message at 08:47 on Aug 5, 2014

poverty goat
Feb 15, 2004



YouTuber posted:

Oh man, I totally forgot about F.lux and Redshift. That initial color shift is a bitch when it goes from white background to some parchment looking stuff.

The computers in question are in my bedroom so if I wind up with the monitor turned on often at night it's kind of a big deal. My entire teenage-young adult life, I used a computer before bed and slept on vampire hours, because that's when I finally got sleepy and I figured that was just how my clock ticked. I started using f.lux for a while and thought it was kind of silly until, after a reformat, I forgot to reinstall f.lux and my schedule immediately reset to vampire time, at which point I realized I'd been sleeping normally for months. Then, it happened again. Now I make a point of having it on any screen I use at night, because sleeping by midnight is a useful life skill and that poo poo works.

f.lux has a slow transition option that makes it make the switch gradually over an hour or so and in 4+ years using it I have never once noticed it happening that way.

Anyway, removing f.lux seems to have fixed my issue, and I might still dump unity for lxde while I'm on it because it's totally adequate for the things I occasionally want a graphical desktop for on this particular machine and it's a repurposed "server" with only 8 gigs of ram.

poverty goat fucked around with this message at 08:02 on Aug 5, 2014

Lawen
Aug 7, 2000

fletcher posted:

Puppet questions:

How do I get the puppet nginx module to use an nginx package that has SPDY enabled? Do I have to build the deb myself?

According to this merged PR from the module you linked, you should be able to toggle SPDY via a declaration in your manifest.

quote:

How come some modules support hiera and some do not?

Presumably because whoever wrote those modules didn't define data sources for hiera. If it's an actively developed module you can probably just open an issue. I bet most module Devs would be thrilled if you wrote the YAML/JSON yourself and submitted a PR. In short, hiera is optional for modules (even Forge modules).

quote:

What's the difference between include nginx and class { 'nginx': }?

This may help. Basically, classes are reusable, regular includes aren't.

quote:

Why does puppet seem so much more confusing than chef?

Do you do Ruby dev? I've seen good and bad implementations of both. IMO the puppet DSL is something you kinda have to treat as learning a new language syntax while Chef's DSL is "regular Ruby plus some other stuff", so if you're coming into it with a Ruby background it probably makes more sense right away. Personally, I think puppet manifests and modules are easier to read and write than Chef recipes.

kiwid
Sep 30, 2013

Something weird is going on with my SSH config. I setup a brand new Ubuntu Server 14.04 LTS on the weekend. I quickly setup SSH public key authentication and disabled password auth. The only two things I've changed are "PermitRootLogin no" and "PasswordAuthentication no". Here is my config:

/etc/ssh/sshd_config
code:
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin no
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile     %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
My public key is in ~/.ssh/authorized_keys and everything works. I try to login via PuTTY without my private key and it fails. I try to login with my private key and it works. However, the problem is that when I use an SSH tunnel, for example, SQLyog allows MySQL connections through an SSH tunnel, the connection seems to work with password auth and it doesn't actually require my private key at all. Is there some fuckery I'm missing for SSH tunnel connections?

Hollow Talk
Feb 2, 2014

kiwid posted:

Something weird is going on with my SSH config. I setup a brand new Ubuntu Server 14.04 LTS on the weekend. I quickly setup SSH public key authentication and disabled password auth. The only two things I've changed are "PermitRootLogin no" and "PasswordAuthentication no". Here is my config:

<snip>

My public key is in ~/.ssh/authorized_keys and everything works. I try to login via PuTTY without my private key and it fails. I try to login with my private key and it works. However, the problem is that when I use an SSH tunnel, for example, SQLyog allows MySQL connections through an SSH tunnel, the connection seems to work with password auth and it doesn't actually require my private key at all. Is there some fuckery I'm missing for SSH tunnel connections?

This might be silly, but do you have it set up that PuTTY unlocks your key for you and keeps it unlocked, essentially like ssh-agent? That way you'd only have to input your password once and every subsequent ssh attempt would still use your key credentials. Have you tried running the SQLyog commands before ever doing anything else with ssh? Does it still not ask you for your password to unlock your private key in that instance?

Your sshd_config looks fine to me, by the way.

kiwid
Sep 30, 2013

Hollow Talk posted:

This might be silly, but do you have it set up that PuTTY unlocks your key for you and keeps it unlocked, essentially like ssh-agent? That way you'd only have to input your password once and every subsequent ssh attempt would still use your key credentials. Have you tried running the SQLyog commands before ever doing anything else with ssh? Does it still not ask you for your password to unlock your private key in that instance?

Your sshd_config looks fine to me, by the way.

I do have Pageant usually running but I disabled it in my troubleshooting and it still connects.

I've tried running SQL commands and they fully work.

evol262
Nov 30, 2010
#!/usr/bin/perl
Tunneling uses the same auth mechanisms as everything else.

Go look at /var/log/auth.log after your application connects.

kiwid
Sep 30, 2013

evol262 posted:

Tunneling uses the same auth mechanisms as everything else.

Go look at /var/log/auth.log after your application connects.



Weird, it appears to be using publickey authbut this is my SQLyog config:







I had it set for password authentication but the last screenshot shows that I don't have a key file in the publickey auth method. There is no key file setup in the connection and Pageant (ssh-agent) isn't running. Also, I've reproduced this issue on two computers.

kiwid fucked around with this message at 14:39 on Aug 5, 2014

kiwid
Sep 30, 2013

Aha! I figured it out.

So I decided to remove all instances of my private key off this computer and reboot. Upon login, I could not open the conneciton, as expected. Then, I copied my private key (.ppk) file to my home directory (C:\Users\me) and did nothing else, I didn't load it up into Pageant or anything, I just simply copied it over. Then I tried to relaunch the connection and it worked. It appears SQLyog is auto searching my home directory for .ppk files or something. Pretty retarded in my opinion but whatever, at least I know SSH pubkey is working properly.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Lawen posted:

According to this merged PR from the module you linked, you should be able to toggle SPDY via a declaration in your manifest.


Presumably because whoever wrote those modules didn't define data sources for hiera. If it's an actively developed module you can probably just open an issue. I bet most module Devs would be thrilled if you wrote the YAML/JSON yourself and submitted a PR. In short, hiera is optional for modules (even Forge modules).


This may help. Basically, classes are reusable, regular includes aren't.


Do you do Ruby dev? I've seen good and bad implementations of both. IMO the puppet DSL is something you kinda have to treat as learning a new language syntax while Chef's DSL is "regular Ruby plus some other stuff", so if you're coming into it with a Ruby background it probably makes more sense right away. Personally, I think puppet manifests and modules are easier to read and write than Chef recipes.

Thanks for the info! I had also found that PR and tried using the spdy toggle, but I ended up with:
code:
Execution of '/etc/init.d/nginx restart' returned 1: Restarting nginx: nginxngin
x: [emerg] the "spdy" parameter requires ngx_http_spdy_module
I don't see how to customize what deb package it uses or the option to install from source tho.

I'd be interested in writing a PR to add hiera support. For a module like the ufw one, it was fairly clear how it was supporting hiera. For a module like puppet-ssh it was much less clear how hiera was supported. I tried their example but couldn't get it to work, and looking through the source I didn't see anything about hiera.

Nope I didn't know any Ruby until I started playing around with Chef a few months ago. I'll keep at it though, not gonna give in and go back to chef just yet.

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

fletcher posted:

Thanks for the info! I had also found that PR and tried using the spdy toggle, but I ended up with:
code:
Execution of '/etc/init.d/nginx restart' returned 1: Restarting nginx: nginxngin
x: [emerg] the "spdy" parameter requires ngx_http_spdy_module
I don't see how to customize what deb package it uses or the option to install from source tho.

I'd be interested in writing a PR to add hiera support. For a module like the ufw one, it was fairly clear how it was supporting hiera. For a module like puppet-ssh it was much less clear how hiera was supported. I tried their example but couldn't get it to work, and looking through the source I didn't see anything about hiera.

Nope I didn't know any Ruby until I started playing around with Chef a few months ago. I'll keep at it though, not gonna give in and go back to chef just yet.

Puppet doesn't handle those things.

Theoretically, you could add declarations to download and compile (with arbitrary commands you put in the manifest yourself) under some condition, like nginx -V not matching something.

Otherwise, get the deb, put it in a repo, and tell puppet to make sure that repo is present. Or use a public repo.

You can make chef do weird things. You can also make puppet do them. They're hard to do because it's not the intended use case or good practice.

Build it and add it, make a class which requires that repo and installs nginx, make your web servers match that class.

Config management is not a replacement for your other tools (package manager, etc). It's complimentary.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

fletcher posted:

Why does puppet seem so much more confusing than chef?
Speaking as someone who's used Chef for a year and Puppet for five, and has a decade of Ruby under his belt: this is because Chef has gone through a lot of work to make their product seem much less confusing than it actually is.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
There's a library for working with a dumb piece of hardware. The library communicates with the hardware through some mapped physical memory. Nobody considered the possibility of multiple processes using the hardware at the same time until I looked at the code. Would a named semaphore used by the library be a good way to manage synchronization? What happens if a process locks the semaphore and then crashes?

evol262
Nov 30, 2010
#!/usr/bin/perl
You have basically three routes:
  • First is to make a trivial daemon which all processes communicate with to talk to the device. May not be your code to control, though.
  • Second is semaphores. Using SEM_UNDO protects you from some problems crashing, but I don't know your use case
  • Last is locking on a file, which is the route taken by many applications these days. Create a lockfile in /tmp (and really, you don't need a semaphore if all you're doing is trying to lock resources) and lock it exclusively, and have other processes block until it's unlocked

But I don't know what you're doing. If you want to make an ordered queue, use semaphores. If you want to exclusively lock between related processes, use a mutex. If you want to exclusively lock across unrelated processes, use a lockfile with exclusive open and blocking.

Semaphores aren't really meant to be locked and unlocked. They're meant to be incremented and decremented. If you're just incrementing and decrementing by one, there's almost no reason to use them.

ProfessorBooty
Jan 25, 2004

Amulet of the Dark
I've been running Linux on all my machines for the last three or so years, but my work has gotten to the point where I pretty much need Windows so I can run office software and a couple 3D modelling programs, and also with this new laptop I'm more interested in games (and now the ones I'm interested in the most are on Linux :p ). So this is the first time I've ever done a dualboot thing, but now that I've gotten everything tweaked I'm really liking the results - grub2 is the bootloader with Windows 8.1 and Mint 17.

The problem is in order to do all this I had to turn off secureboot(which I've read isn't that secure to begin with). I couldn't get secureboot to work when dual booting and I'm not going to bother any more. I guess my question is if there is any way for me to backup the windows bootloader on one of my Linux partitions so I can recover from a rootkit, and also if there's any good documentation on how to unmount my Linux boot partition so I can avoid that as well? If I'm overly worried about the second case just let me know.

Also I'm a big time Linux-noob, even if I have been using it this long, and just let me know if this is likely more a Windows question.

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

ProfessorBooty posted:

I've been running Linux on all my machines for the last three or so years, but my work has gotten to the point where I pretty much need Windows so I can run office software and a couple 3D modelling programs, and also with this new laptop I'm more interested in games (and now the ones I'm interested in the most are on Linux :p ). So this is the first time I've ever done a dualboot thing, but now that I've gotten everything tweaked I'm really liking the results - grub2 is the bootloader with Windows 8.1 and Mint 17.

The problem is in order to do all this I had to turn off secureboot(which I've read isn't that secure to begin with). I couldn't get secureboot to work when dual booting and I'm not going to bother any more. I guess my question is if there is any way for me to backup the windows bootloader on one of my Linux partitions so I can recover from a rootkit, and also if there's any good documentation on how to unmount my Linux boot partition so I can avoid that as well? If I'm overly worried about the second case just let me know.

Also I'm a big time Linux-noob, even if I have been using it this long, and just let me know if this is likely more a Windows question.

You can back it up with dd.

But you have secureboot, which means you system is EFI. Mount the EFI partition and copy off the windows loader if you care that much.

It won't do anything to protect you from rootkits, which almost never touch the bootloader (especially on EFI). Bootkits exist for EFI, but they're few and far between. It's not going to happen accidentally.

Unmounting your Linux boot partition will also do absolutely nothing unless it's the most naive virus writer in existence. Either they have root and they can write whatever, mount the EFI partition/write the MBR (on a BIOS system), or they can't.

You can trivially recover by DD-ing it away and reinstalling grub.

This isn't so much a Windows question as an irrelevant one, honestly.

Why are you concerned about any of this? Why do you think it's likely? EFI is just FAT. It's files. You can easily do whatever you want to them, including removing bootkits. dd trivially removes bootkits on MBR.

ProfessorBooty
Jan 25, 2004

Amulet of the Dark

evol262 posted:

You can back it up with dd.

But you have secureboot, which means you system is EFI. Mount the EFI partition and copy off the windows loader if you care that much.

It won't do anything to protect you from rootkits, which almost never touch the bootloader (especially on EFI). Bootkits exist for EFI, but they're few and far between. It's not going to happen accidentally.

Unmounting your Linux boot partition will also do absolutely nothing unless it's the most naive virus writer in existence. Either they have root and they can write whatever, mount the EFI partition/write the MBR (on a BIOS system), or they can't.

You can trivially recover by DD-ing it away and reinstalling grub.

This isn't so much a Windows question as an irrelevant one, honestly.

Why are you concerned about any of this? Why do you think it's likely? EFI is just FAT. It's files. You can easily do whatever you want to them, including removing bootkits. dd trivially removes bootkits on MBR.

I don't have secureboot - I guess I could have made that more clear. I'm not worried about the linux partition as much as I'm worried about Windows. If this is an irrelevant question, then thanks for putting my mind at ease.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Somebody asked this a bunch of pages ago but the responses didn't really illuminate things for me. How do you organize stuff in puppet? My default.pp is growing and I'm not sure how to split it up and keep things organized.

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

ProfessorBooty posted:

I don't have secureboot - I guess I could have made that more clear. I'm not worried about the linux partition as much as I'm worried about Windows. If this is an irrelevant question, then thanks for putting my mind at ease.

To put it a different way:

You don't have secureboot, so you have no way to know you're booting a verified image. That part is a potential security risk (assuming bootkits become common all of a sudden).

However, EFI is both simpler and more complex than traditional MBR schemes. Unmounting partitions offers no protection from well-written viruses anyway, and its predictable location plus common filesystem makes it trivial for anyone to go poke around if they have admin/root access. But there's no need to back up your bootloader, because it's trivially reinstalled by Windows, Linux, or anything else which can copy a file onto FAT32 (everything).

thebigcow
Jan 3, 2001

Bully!

fletcher posted:

Somebody asked this a bunch of pages ago but the responses didn't really illuminate things for me. How do you organize stuff in puppet? My default.pp is growing and I'm not sure how to split it up and keep things organized.

There's a puppet thread now http://forums.somethingawful.com/showthread.php?threadid=3654103

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
Holy poo poo I was just going to say we should have a Puppet/Chef/Config Management thread.

fuf
Sep 12, 2004

haha
Is there a good terminal tool that'll let me save useful command snippets?

Like if I execute a long rsync command I could do a "save last command" and then next time do a "search for rsync commands" and it would pop up?

Alternatively: what's a good way to store commands that I use a lot but are too long to remember?

wooger
Apr 16, 2005

YOU RESENT?

Suspicious Dish posted:

Non-US keyboard layouts should be configured with XKB. And if you really need an xorg.conf snippet, use dropfiles in /etc/xorg.conf.d/

Nvidia + dodgy Korean monitor = I have to heavily customise this and link out to an EDID file.

Xorg.conf is alive and well.

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

fuf posted:

Is there a good terminal tool that'll let me save useful command snippets?

Like if I execute a long rsync command I could do a "save last command" and then next time do a "search for rsync commands" and it would pop up?

Alternatively: what's a good way to store commands that I use a lot but are too long to remember?

The history file and Ctrl+r

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

evol262 posted:

The history file and Ctrl+r
History file is great, but you shouldn't rely on it. It deletes old commands if it is full, and it doesn't get written if you don't close your shell. Both of those are annoying to find out the hard way.

I do use the history file for commands that I use rarely but regularly. But the really annoying ones I have saved in an extra text file.

fuf
Sep 12, 2004

haha

evol262 posted:

The history file and Ctrl+r

ugh so much basic poo poo I still don't know. Thanks.

While we're on the subject of basic poo poo I don't know, can I get a couple more book recommendations? Something that will save me asking dumb questions like the above. I'm working my way through 'The Linux A-Z' by Phil Cornes and The Debian Administrators Handbook (which I'm pretty sure was recommended to me by this thread). Both are fine but not particularly well-written so it's a bit of a slog.

e: vvvv that's one I do know :)

fuf fucked around with this message at 15:41 on Aug 6, 2014

fatherdog
Feb 16, 2005

fuf posted:

Alternatively: what's a good way to store commands that I use a lot but are too long to remember?

.bashrc/.cshrc/whateveryourshellisrc and alias.

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

tonberrytoby posted:

History file is great, but you shouldn't rely on it. It deletes old commands if it is full, and it doesn't get written if you don't close your shell. Both of those are annoying to find out the hard way.

I do use the history file for commands that I use rarely but regularly. But the really annoying ones I have saved in an extra text file.

I have every system I use set to append the history file when I run commands, which also lets you run multiple instances and have them all update the history file in order.

There's also almost no reason not to have thousands of lines in your history these days. Everything is trivially configurable.

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

evol262 posted:

I have every system I use set to append the history file when I run commands, which also lets you run multiple instances and have them all update the history file in order.
How do you configure that? I never even got around to checking if that is possible?

Lawen
Aug 7, 2000

evol262 posted:

I have every system I use set to append the history file when I run commands, which also lets you run multiple instances and have them all update the history file in order.

There's also almost no reason not to have thousands of lines in your history these days. Everything is trivially configurable.

Yeah, this. Append + ≥10,000 line history + expire dupes first. You'll pretty much never dump stuff from history.

If I do hack together some long/complex one-liner that I may want to use again, I find that gist works really well for holding on to it. I use github a lot anyway though so ymmv.

tonberrytoby posted:

How do you configure that? I never even got around to checking if that is possible?

My .zshrc looks like this (based on oh-my-zsh). It's probably fairly similar in BASH 4+
code:
## Command history configuration
if [ -z $HISTFILE ]; then
    HISTFILE=$HOME/.zsh_history
fi
HISTSIZE=10000
SAVEHIST=10000

setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_dups # ignore duplication command history list
setopt hist_ignore_space
setopt hist_verify
setopt inc_append_history
setopt share_history # share command history data

Lawen fucked around with this message at 16:10 on Aug 6, 2014

hooah
Feb 6, 2006
WTF?
I'm finally trying to really get used to Linux, so I'm going through the Introduction to Linux edX course. I installed Ubuntu on my desktop, but I'm at work currently, so I made a live USB stick to use on my laptop. However, some things are behaving strangely. For example, I can't change the wallpaper: when I select a different one, nothing changes. Also, when I tick the box for natural scrolling, it immediately un-ticks. Any ideas why these things are happening?

SurgicalOntologist
Jun 17, 2004

fuf posted:

ugh so much basic poo poo I still don't know. Thanks.

While we're on the subject of basic poo poo I don't know, can I get a couple more book recommendations? Something that will save me asking dumb questions like the above. I'm working my way through 'The Linux A-Z' by Phil Cornes and The Debian Administrators Handbook (which I'm pretty sure was recommended to me by this thread). Both are fine but not particularly well-written so it's a bit of a slog.

e: vvvv that's one I do know :)

I like using history-search-backwards which basically means when you press up, instead of just going through your history in order, it goes through your history filtering based on the characters you have already typed. Here's the first thing I found describing how to set it up: http://codeinthehole.com/writing/the-most-important-command-line-tip-incremental-history-searching-with-inputrc/

Longinus00
Dec 29, 2005
Ur-Quan

fuf posted:

ugh so much basic poo poo I still don't know. Thanks.

While we're on the subject of basic poo poo I don't know, can I get a couple more book recommendations? Something that will save me asking dumb questions like the above. I'm working my way through 'The Linux A-Z' by Phil Cornes and The Debian Administrators Handbook (which I'm pretty sure was recommended to me by this thread). Both are fine but not particularly well-written so it's a bit of a slog.

e: vvvv that's one I do know :)

The linux course on Edx actually covers bash history and other miscellaneous introductory things like that. You should probably give it a go. It's free to take and there are no real deadlines I don't think so you can do it at your own pace. It's very introductory, for example one of the first things it goes over is changing the desktop wallpaper.

hooah posted:

I'm finally trying to really get used to Linux, so I'm going through the Introduction to Linux edX course. I installed Ubuntu on my desktop, but I'm at work currently, so I made a live USB stick to use on my laptop. However, some things are behaving strangely. For example, I can't change the wallpaper: when I select a different one, nothing changes. Also, when I tick the box for natural scrolling, it immediately un-ticks. Any ideas why these things are happening?

The only thing that comes to mind is if somehow some permission are set read only somewhere.

nescience
Jan 24, 2011

h'okay
I have a small VPS i'm just messing around in to learn about Linux servers, I found out a few days ago that it got turned into a spam email bot. I stopped the any daemons related to my email server, and I'm shutting down the VPS after I download all the logs in the /var/log/ folder. I want to use this as a learning experience. What should I be looking for in logs to find out how this happened? And how do I go about cleaning it up outside of a fresh install?

I'm looking at the mail.log, i see a lot of RCPT errors and a test account I made (with a bad password) that sent spam emails, so I'm guessing that's the culprit?
last -F doesn't show any logins from unrecognized IPs, does that mean no one's tried to access the shell yet?
Are there anything else besides ClamAV that I can use to scan for viruses?

nescience fucked around with this message at 05:31 on Aug 7, 2014

Adbot
ADBOT LOVES YOU

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

nescience posted:

I have a small VPS i'm just messing around in to learn about Linux servers, I found out a few days ago that it got turned into a spam email bot. I stopped the any daemons related to my email server, and I'm shutting down the VPS after I download all the logs in the /var/log/ folder. I want to use this as a learning experience. What should I be looking for in logs to find out how this happened? And how do I go about cleaning it up outside of a fresh install?

I'm looking at the mail.log, i see a lot of RCPT errors and a test account I made (with a bad password) that sent spam emails, so I'm guessing that's the culprit?
last -F doesn't show any logins from unrecognized IPs, does that mean no one's tried to access the shell yet?
Are there anything else besides ClamAV that I can use to scan for viruses?

You don't have a virus. Most Linux exploits are problems with code which become known shortly before after fixes, at which point systems which haven't been updated are vulnerable (Debian/Ubuntu had a problem with breakable encryption keys a few years ago). Viruses exist, but are very rare these days (there were a few in the earlier days of the internet on various UNIX flavors).

Do use rootkit checkers just to be safe, though.

It's almost certainly a bad password. Or simply a misconfigured mail server which was an open relay. There's almost no reason to run your own mail, and I'd suggest you avoid it as a beginner. This requires no cleanup other than not running your own mail.

Check /var/log/secure or auth.log (depending on distro) instead of "last".

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