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
anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

Mr Shiny Pants posted:

Why would you turn it off?
Because of the performance impact.

Adbot
ADBOT LOVES YOU

evol262
Nov 30, 2010
#!/usr/bin/perl
Windows ships with mitigations disabled.

RHEL shipped with it on, then turned it off a few months later because most of our customers didn't care anyway (internal/firewalled servers) and the performance hit mattered.

The mitigations are opt-in on basically every OS, not opt-out

I'd guess it's pretty much azure, gce, rackspace, AWS, digital ocean, and similar who actually have it turned on.

Thermopyle
Jul 1, 2003

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

I've got a folder of files on my Ubuntu server owned by root that I'd like to edit from a windows PC.

Whats a good best practices sort of workflow for setting that up?

I don't really like the idea of enabling the root user, but I also don't know of a way to do a sudo sort of access to the files.

RFC2324
Jun 7, 2012

http 418

Thermopyle posted:

I've got a folder of files on my Ubuntu server owned by root that I'd like to edit from a windows PC.

Whats a good best practices sort of workflow for setting that up?

I don't really like the idea of enabling the root user, but I also don't know of a way to do a sudo sort of access to the files.

WSL + ssh + sudo + vim?

Or notepad++ with ftps enabled

both of these with your ssh keys installed for security

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
SSHFS?

evol262
Nov 30, 2010
#!/usr/bin/perl
Have you tried not doing that?

But honestly, sshfs is a good solution. Eclipse, Sublime, VScode, and others support remote editing this way. Or the NFS client on Windows. Or configure Samba to treat Administrator as uid0

minato
Jun 7, 2004

cutty cain't hang, say 7-up.
Taco Defender
For security, you might be able to chgrp them to some group that can edit the files, and then add a user that's also a member of that group.

Docjowles
Apr 9, 2009

“It hurts when I do that” “So don’t fuckin do that” :v:

In a work environment I’d say edit the file locally and then push it to your other box with config management or at least a git repo. But for home use any number of the above solutions seem cool and good.

hifi
Jul 25, 2012

Emacs can do it with tramp in windows or windows linux or on the ubuntu server, although I'm not sure what your sudo problem entails or if you just mean you aren't sure how to set this all up without touching the command line

Thermopyle
Jul 1, 2003

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

Turns out that I had already enabled root login for other purposes in the past so I just said gently caress it and set up a samba share for that specific folder with root user access.

Volguus
Mar 3, 2009

Thermopyle posted:

Turns out that I had already enabled root login for other purposes in the past so I just said gently caress it and set up a samba share for that specific folder with root user access.

That's the spirit.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!

Volguus posted:

That's the spirit.

If that was supposed to be sarcasm, I LoL'ed.

xzzy
Mar 5, 2009

Sarcastic but realistic. Eventually everyone gets to the point of "gently caress it, run as root" because they get tired of trying to figure out how to do it right.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
Yeah, but hasn't samba been subject to lots of vulnerabilities over the years?

That's partly what made me LoL, but I guess you could answer that question with "what *hasn't* had vulnerabilies?". I guess the futility of it all is part of the fun, too.

I'm thinking about this far too hard. Must be tired. :)

Volguus
Mar 3, 2009

apropos man posted:

If that was supposed to be sarcasm, I LoL'ed.

Jesus, of course it was sarcastic (i got a lot of that going on at the moment), but really, when you think about it, like xzzy said, I just wanna do X, so gently caress all of ya paranoid security shmucks, and I'll "just do it". For a home user the security threat is very low already. So, nothing really matters and the extra effort required to be security "conscious" is a waste of time.

AgentCow007
May 20, 2004
TITLE TEXT
What's the most "linux" way to do password management? I've been using KeePass for years, but I've been playing with i3 recently and like the idea of moving workflows away from the mouse. The most "linux" thing I could find on YouTube was using ccrypt to encode a text file list of accounts and passwords, then ccat | grep to search and display relevant info... but there has to be something better than that, right?

Docjowles
Apr 9, 2009

There is a tool called “pass” that wraps a workflow involving git and gpg. It’s well suited to CLI and scripted usage.

https://www.passwordstore.org/

Docjowles fucked around with this message at 12:35 on Aug 21, 2018

Keito
Jul 21, 2005

WHAT DO I CHOOSE ?
KeePassXC has a CLI but it's a bit of a hassle to use since you have to authenticate for every invocation, at least AFAIK. In my typical use that means once for searching and a second time for viewing the entry.

ToxicFrog
Apr 26, 2008


AgentCow007 posted:

What's the most "linux" way to do password management? I've been using KeePass for years, but I've been playing with i3 recently and like the idea of moving workflows away from the mouse. The most "linux" thing I could find on YouTube was using ccrypt to encode a text file list of accounts and passwords, then ccat | grep to search and display relevant info... but there has to be something better than that, right?

If you want a keyboard interface to keepass, kpcli gives you an interactive keepass shell. Authentication is once per invokation, not once per command, so you don't have the same issues that KeepassXC has.

If you want something completely different, pass.

Volguus
Mar 3, 2009

AgentCow007 posted:

What's the most "linux" way to do password management? I've been using KeePass for years, but I've been playing with i3 recently and like the idea of moving workflows away from the mouse. The most "linux" thing I could find on YouTube was using ccrypt to encode a text file list of accounts and passwords, then ccat | grep to search and display relevant info... but there has to be something better than that, right?

There is nothing wrong with the mouse. Yes, the keyboard is more efficient and that's important where a small gain can be substantial over a long enough period of time, but for a password manager? How often do you login into poo poo per hour?

Keito
Jul 21, 2005

WHAT DO I CHOOSE ?

Volguus posted:

There is nothing wrong with the mouse. Yes, the keyboard is more efficient and that's important where a small gain can be substantial over a long enough period of time, but for a password manager? How often do you login into poo poo per hour?

All the loving time. kpcli looks neat

Volguus
Mar 3, 2009

Keito posted:

All the loving time. kpcli looks neat

Websites or ssh? Because if ssh you really should look into public/private key auth. If websites ... Good luck.

AgentCow007
May 20, 2004
TITLE TEXT

Volguus posted:

Websites or ssh? Because if ssh you really should look into public/private key auth. If websites ... Good luck.

I personally was thinking about SSH and console related stuff like sudo, because I am literally that lazy. But you'd have to be some kind of masochist to switch back and forth from a graphical web browser to a console-based password manager. I really should set up key auth on my VPSes though.

Horse Clocks
Dec 14, 2004


I have a yubikey that holds my (now expired and I have no idea how to renew it. Benefit of blindly reading guides on the web) GPG key.

Passwords are stored with pass in a git repo, and gpg-agent holds my ssh key.

I can install the smart card packages on any Linux machine and have SSH access to my machines and my passwords within minutes. It’s kinda neat.

I can’t get my passwords on windows as easy, iOS, or android. There’s supposedly apps for all that, but the gpg-ssh stuff is mostly unsupported.

Would I recommend? Eeeehhhh. On the fence.

Truga
May 4, 2014
Lipstick Apathy
keepass has a ssh agent plugin, all my ssh keys are in keepass and as long as keepass is unlocked i log in everywhere freely it owns

lol internet.
Sep 4, 2007
the internet makes you stupid
I have a qnap nas, can someone tell me which command checks to see if there are any smart failures or anything? I think one of the drives are dying but the QNAP OS isn't picking up.

When I run cat/proc/mdtstat, below is what is returned. I can't tell which drive is rebuilding? I assume one is and the one is is actually the one that is failing because its taking a ridiculous amount of time.

code:
[~] # cat /proc/mdstat 
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] 
md1 : active raid5 sda3[0] sdd3[4] sdc3[2] sdb3[1]
      23412214272 blocks super 1.0 level 5, 512k chunk, algorithm 2 [4/3] [UUU_]
      [>....................]  recovery =  0.2% (23122944/7804071424) finish=69633.0min speed=1862K/sec
      
md322 : active raid1 sdd5[3](S) sdc5[2](S) sdb5[1] sda5[0]
      7235136 blocks super 1.0 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md256 : active raid1 sdd2[3](S) sdc2[2](S) sdb2[1] sda2[0]
      530112 blocks super 1.0 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md13 : active raid1 sda4[0] sdd4[33] sdc4[32] sdb4[1]
      458880 blocks super 1.0 [32/4] [UUU_U___________________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md9 : active raid1 sda1[0] sdd1[33] sdc1[32] sdb1[1]
      530048 blocks super 1.0 [32/4] [UUU_U___________________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>

Sheep
Jul 24, 2003
smartctl

mdadm -D /dev/md1 to see details on the rebuild; see here.

Sheep fucked around with this message at 10:23 on Aug 24, 2018

lol internet.
Sep 4, 2007
the internet makes you stupid
Hmm looks like smartctl isn't installed by default. is the result for th erecovery. I take it the 4th drive is failing which is sdd ? or at least rebuilding anwyays.

code:
[~] # mdadm --detail /dev/md1
/dev/md1:
        Version : 1.0
  Creation Time : Wed Mar  7 06:13:40 2018
     Raid Level : raid5
     Array Size : 23412214272 (22327.63 GiB 23974.11 GB)
  Used Dev Size : 7804071424 (7442.54 GiB 7991.37 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Fri Aug 24 13:20:17 2018
          State : active, degraded, recovering
 Active Devices : 3
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 512K

 Rebuild Status : 0% complete

           Name : 1
           UUID : 5a3d4cb8:acd4aea6:d7897954:679d3a7a
         Events : 3092

    Number   Major   Minor   RaidDevice State
       0       8        3        0      active sync   /dev/sda3
       1       8       19        1      active sync   /dev/sdb3
       2       8       35        2      active sync   /dev/sdc3
       4       8       51        3      spare rebuilding   /dev/sdd3
Would there be any reason why the drives are rebuilding? I had no notification of any sort of failure. Also its 8TBx4 Drive setup, realistically how long would it take to rebuild. I want to know if the drive is actually failing (rebuilding slow as poo poo) or just the rebuilding process generally takes super long.

Sheep
Jul 24, 2003
sdd3 is the device being rebuilt. As to why that's happening I'm not sure, I've never had any devices fail on an mdadm raid so haven't gone through that process yet.

You won't get any email alerts without the --monitor flag set to email you. Check your system log to see what happened.

FWIW 40something days for an 8TB rebuild is really bad and I'd try to figure out why your speeds are so slow, 1862K/sec is like a fiftieth of what you should be getting with what I'm assuming are 8TB WD Reds.

Sheep fucked around with this message at 10:22 on Aug 24, 2018

Aurium
Oct 10, 2010
I've been working on duplicating an old piece of gear.

In case the process went wrong I backed up the original contents of the donor drive so I could start over. The command I used was dd if=/dev/sdb of=~/backup.img

I then did some other things that went wrong, so I restored the disk from backup, switiching of and if in the above command.

The restored disk wouldn't boot. Can someone tell me where I went wrong?

I ultimately did get it working, so this is just me trying to find what I'm not understanding, shouldn't using dd this way return the disk exactly to how it was before?

lol internet.
Sep 4, 2007
the internet makes you stupid

Sheep posted:

sdd3 is the device being rebuilt. As to why that's happening I'm not sure, I've never had any devices fail on an mdadm raid so haven't gone through that process yet.

You won't get any email alerts without the --monitor flag set to email you. Check your system log to see what happened.

FWIW 40something days for an 8TB rebuild is really bad and I'd try to figure out why your speeds are so slow, 1862K/sec is like a fiftieth of what you should be getting with what I'm assuming are 8TB WD Reds.

Thanks I'm just assuming the rebuilt drive is actually failing or about to fail and SMART didn't pick it up. I am processing a RMA for that drive.

In regards to replacing it, does anyone know if I should be copying the partition table from another drive prior to re-inserting it? I was following this guide: https://www.thegeekdiary.com/replacing-a-failed-mirror-disk-in-a-software-raid-array-mdadm/

I know that's for RAID 1 but I seen a couple search results saying its the same for RAID 5 but they don't really list the reason why. I would of thought just by re-adding it all that stuff is done automatically?

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
What's the default DVD to avi/mkv ripper for Linux? Preferably command-line?

I've got an old BBC comedy DVD box set from eBay and I'd like to plug in my portable USB DVD player (because who uses a SATA DVD ROM these days) into my i7 in an another room, rip it and monitor the progress over SSH.

Quality isn't going to be amazing because it's an old BBC2 show with a low filming budget (https://en.wikipedia.org/wiki/Fist_of_Fun), so I'm not too bothered about tweaking bitrates and achieving maximum quality. I'd just like to end up with a reasonably good quality set of files for each episode that I can archive into my Plex library.

EDIT:
dvdbackup from the Arch wiki seems to be doing a grand job of grabbing the VOB files. When I've got all the VOB's I need I'll have a go at encoding them into something more suitable.

https://wiki.archlinux.org/index.php/dvdbackup

apropos man fucked around with this message at 18:47 on Aug 25, 2018

Mr Shiny Pants
Nov 12, 2012

apropos man posted:

What's the default DVD to avi/mkv ripper for Linux? Preferably command-line?

I've got an old BBC comedy DVD box set from eBay and I'd like to plug in my portable USB DVD player (because who uses a SATA DVD ROM these days) into my i7 in an another room, rip it and monitor the progress over SSH.

Quality isn't going to be amazing because it's an old BBC2 show with a low filming budget (https://en.wikipedia.org/wiki/Fist_of_Fun), so I'm not too bothered about tweaking bitrates and achieving maximum quality. I'd just like to end up with a reasonably good quality set of files for each episode that I can archive into my Plex library.

EDIT:
dvdbackup from the Arch wiki seems to be doing a grand job of grabbing the VOB files. When I've got all the VOB's I need I'll have a go at encoding them into something more suitable.

https://wiki.archlinux.org/index.php/dvdbackup

Handbrake is cool.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
Yeah. Now that I've just about finished grabbing all the VOB's I might just run the Handbrake GUI in batch mode.

telcoM
Mar 21, 2009
Fallen Rib

lol internet. posted:

Thanks I'm just assuming the rebuilt drive is actually failing or about to fail and SMART didn't pick it up. I am processing a RMA for that drive.

In regards to replacing it, does anyone know if I should be copying the partition table from another drive prior to re-inserting it? I was following this guide: https://www.thegeekdiary.com/replacing-a-failed-mirror-disk-in-a-software-raid-array-mdadm/

I know that's for RAID 1 but I seen a couple search results saying its the same for RAID 5 but they don't really list the reason why. I would of thought just by re-adding it all that stuff is done automatically?

I think you said the RAID array is in a QNAP NAS box.

Even if the QNAP user interface does not yet show the disk as failed, it will definitely go into :supaburn: mode if you just yank a disk out without any advance notice. And if you insert a new unpartitioned disk, the system should generally more or less automatically partition it as required. If you partition it manually before inserting it, the user interface may just overwrite your work... or it may think everything necessary has been done, and later get wedged since something behind-the-scenes but essential like a QNAP bootloader did not get copied to that disk after all.

https://www.qnap.com/en/how-to/tutorial/article/online-raid-capacity-upgrade

Turns out that in the Storage Pool Management window, there should be a Manage -> Replace Disks One by One function. I think you should use it if the user interface has not yet detected the disk as faulty.

And here are QNAP's instructions for replacing disks in the event the UI does identify them as failed:

https://helpdesk.qnap.com/index.php?/Knowledgebase/Article/View/89/0/a-hard-disk-drive-error-is-shown-on-the-nas-what-should-i-do

Disclaimer: I don't own a QNAP device, but I've remote-administered one at work. (Very remote: had I needed to go to the device physically, I'd have needed a passport, a visa and a plane ticket. So the motivation to be careful was definitely there.)

KOTEX GOD OF BLOOD
Jul 7, 2012

Got an odroid c1+, installed the Ubuntu MATE image and trying to get my docker image to run. I get
code:
docker: Error response from daemon: Could not check if docker-default AppArmor profile was loaded: open /sys/kernel/security/apparmor/profiles: no such file or directory.
When I cd to /sys/kernel/security/apparmor, I can see that there is no profiles directory. When I try to make one I get "operation not permitted," even under su.

I hate this thing literally nothing runs right the first time.

evol262
Nov 30, 2010
#!/usr/bin/perl
/sys isn't normally a filesystem you can write that way. It's a representation of kernel structs. Does the kernel have the auditd subsystem enabled? Is AppArmor loaded?

KOTEX GOD OF BLOOD
Jul 7, 2012

Well...it didn't have auditd installed, so I installed it using apt-get. AppArmor is installed, but when I run sudo apparmor_status, I get:

code:
apparmor module is loaded.
Could not open /sys/kernel/security/apparmor/profiles: No such file or directory

evol262
Nov 30, 2010
#!/usr/bin/perl
I meant the kernel auditing subsystem, which selinux and AppArmor are parts of. My guess is that the odroid kernel was built without it, and you'll have to build your own kernel to get it

Adbot
ADBOT LOVES YOU

KOTEX GOD OF BLOOD
Jul 7, 2012

Well I switched to the ubuntu image after trying a minimal debian jesse image. The transmission-openvpn container would run under that, but it would throw "error: file too large" on the newest torrents before ceasing to respond altogether.

It's great that Raspbian runs this stuff without a hitch, save for the fact the network interface stops responding once a week and I have to pull the power, also that it's limited to USB 2.0 bus speeds.

Linux: There is always more and it is always worse

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