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
covener
Jan 10, 2004

You know, for kids!

YouTuber posted:

How do you guys find and install the various missing packages for to pass configuration checks when compiling software? I'm working with Ubuntu and attempting to compile a newer version of network-manager and network-manager-applet since the current version in 16.04 is broken. I launch configure it runs for a bit then spews out missing packages. Tells me to install gio-unix. I apt search; find multiple versions of libgio and install them all. Start configure again and still says missing gio-unix. I go search and find it's in some alphabet soup package.

Is there some way of automating the install of these missing packages? Half the missing packages are renamed in the Ubuntu repository or grouped under some other package so each individual roadblock requires a google search to find the real name.

You could install the build-deps of the packaged version (apt-get build-dep foo) to get a head start

Adbot
ADBOT LOVES YOU

YouTuber
Jul 31, 2004

by FactsAreUseless

covener posted:

You could install the build-deps of the packaged version (apt-get build-dep foo) to get a head start

Works like a charm. Thanks.

Xik
Mar 10, 2011

Dinosaur Gum
Just thought I would chime in and mention that I recently learned about systemd.timer and it seems to be a neat thing. It didn't take long to rewrite my crontab as systemd units, but I am a fairly light user.

Apart from being able to easily just throw the timer and service units in version control, there are a couple of features that "sold me":

For my desktop/"not always on" machines:

quote:

Persistent=

Takes a boolean argument. If true, the time when the service unit was last triggered is stored on disk. When the timer is activated, the service unit is triggered immediately if it would have been triggered at least once during the time when the timer was inactive. This is useful to catch up on missed runs of the service when the machine was off. Note that this setting only has an effect on timers configured with OnCalendar=. Defaults to false.

For servers:

quote:

Note that in case the unit to activate is already active at the time the timer elapses it is not restarted, but simply left running. There is no concept of spawning new service instances in this case.

kujeger
Feb 19, 2004

OH YES HA HA
systemd is good stuff

Iron Beagle
Apr 27, 2007
Any recommendations (books or otherwise) for advancing my knowledge of Puppet? I use it quite a bit at work but was not involved with architecting the current setup. I can get around the environment just fine and understand how the pieces are flowing, but generally feel lacking in expertise.

Lum
Aug 13, 2003

Gave in and removed Systemd from my Gentoo lappy as none of the solutions for hanging on shutdown due to nfs+wifi worked.

I've also noticed that any mount failure on either boot or shutdown creates a massive delay with systemd. What's that about? Just report the failure and continue.

Vulture Culture
Jul 14, 2003

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

Iron Beagle posted:

Any recommendations (books or otherwise) for advancing my knowledge of Puppet? I use it quite a bit at work but was not involved with architecting the current setup. I can get around the environment just fine and understand how the pieces are flowing, but generally feel lacking in expertise.
Pro Puppet used to be rather good, but the Second Edition came out in Dec 2013 and it's probably fallen quite out of date since then. O'Reilly has Learning Puppet 4 out as of a few months ago, but I haven't read it and can't vouch for it.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
Is it possible to copy files from one ntfs-3g filesystem to another ntfs-3g filesystem while retaining the permissions between the source and destination? I don't care whatsoever about any kind of Linux user mapping, I just want a Windows system to see the right permissions on the file.

evol262
Nov 30, 2010
#!/usr/bin/perl
If you want full NTFS acl, ntfscp used to be a thing. It may still be.

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:
I believe Clonezilla can do that. That runs as a bootable image, but it has some info on the tools it uses, I think it is partclone or ntfsclone.

VikingofRock
Aug 24, 2008




This might not be a linux question per se, but I think this is the best thread for it. Years ago, I installed GRUB2 when I installed Ubuntu in a two-partition scheme with Windows. Now I want to wipe out Ubuntu and put on Fedora. I've made the appropriate backups and am ready to format the Ubuntu partition, but I'm worried about GRUB. If I understand how GRUB works correctly, it mostly exists outside of any partition, but it has some important files in the Ubuntu partition. So when I format the Ubuntu partition, I think that will mess up GRUB. So what's the procedure here? How do I migrate GRUB's files from Ubuntu to Fedora?

evol262
Nov 30, 2010
#!/usr/bin/perl
Is this grub legacy or efi?

Legacy relies on a stage1 loader in the MBR which basically just knows how to find the grub executable on a plain partition. GPT disks using grub2 have enough room to do the same thing for mdraid and lvm devices.

EFI is an EFI executable, which... None of this matters

Why do you need to save grub? The Fedora installer will put a bootloader on, and find your windows partition if you have one. If there's something specific you want, just snip the relevant lines of grub.cfg/conf and add them after Fedora is installed

VikingofRock
Aug 24, 2008




evol262 posted:

Is this grub legacy or efi?

Legacy relies on a stage1 loader in the MBR which basically just knows how to find the grub executable on a plain partition. GPT disks using grub2 have enough room to do the same thing for mdraid and lvm devices.

EFI is an EFI executable, which... None of this matters

Why do you need to save grub? The Fedora installer will put a bootloader on, and find your windows partition if you have one. If there's something specific you want, just snip the relevant lines of grub.cfg/conf and add them after Fedora is installed

It's EFI. And actually that's a good point about Fedora putting on GRUB. Thanks. I just wanted to make sure I wasn't going to bork my system.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
ZFS on Ubuntu 16.04:

I'm trying to set a mountpoint for a ZFS filesystem so I can NFS-export it. For any filesystem other than my root, which is working well, doing zfs set mountpoint=whatever rpool/sub-fs just creates an empty directory. If the filesystem contains other ZFS filesystems underneath, directories will get created for those, but those are also all empty. The filesystems show up under mount after setting the mountpoint, but are still empty.

Any ideas what the poo poo is going on?

Horse Clocks
Dec 14, 2004


IAmKale posted:

I just read that Dell has PPAs that come installed on the Developer Edition of their XPS 13s. Does anyone have a list of those PPAs? I'm using Ubuntu 16.04 on a month-old XPS 15 and I'm wondering if the PPAs have drivers or whatnot that'll help bring the last bit of stability to my machine.
Keen to know about this too. I have the 'business' precision 5510, which I think is just the XPS with a tegra and Intel wifi.

Would love that thunderbolt dock to work.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Is there any gui file manager that will let me browse and drag & drop remote files, using ssh and scp as the backend?

Before someone says it, the remote box is a hosed up embedded linux and has no SFTP, so everything that relies on SFTP for "SSH" connections is not going to work (filezilla for example).

RFC2324
Jun 7, 2012

http 418

peepsalot posted:

Is there any gui file manager that will let me browse and drag & drop remote files, using ssh and scp as the backend?

Before someone says it, the remote box is a hosed up embedded linux and has no SFTP, so everything that relies on SFTP for "SSH" connections is not going to work (filezilla for example).

I assume you mean for windows, in which case winscp should do it.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

RFC2324 posted:

I assume you mean for windows, in which case winscp should do it.
No, the remote and local system are both Linux.

Pablo Bluth
Sep 7, 2007

I've made a huge mistake.
Mount the remote system locally using sshfs, then use use your usual file manager?

Varkk
Apr 17, 2004

Used to do this in KDE3 using Konquorer file manager. I think you used fish://server.domain/path/
Should be able to do it in Dolphin as well.

Death Vomit Wizard
May 8, 2006
Bottom Feeder
I have made a noob Red Hat mistake and I'm currently stuck. I registered a RHN account for a developer (free) subscription and installed RHEL 7 (bare metal). Registered it, auto-added the subscription and everything was cool.

hosed around with it for a day, decided I didn't like my setup and wiped / reinstalled the OS. Now, when I register it, it says I don't have any subscriptions. In hindsight, the correct move was probably to unregister the first install before wiping. But what's my next move to get my subscription applied to the new install? Google has not been helpful.

Mr Shiny Pants
Nov 12, 2012

Vulture Culture posted:

ZFS on Ubuntu 16.04:

I'm trying to set a mountpoint for a ZFS filesystem so I can NFS-export it. For any filesystem other than my root, which is working well, doing zfs set mountpoint=whatever rpool/sub-fs just creates an empty directory. If the filesystem contains other ZFS filesystems underneath, directories will get created for those, but those are also all empty. The filesystems show up under mount after setting the mountpoint, but are still empty.

Any ideas what the poo poo is going on?

zfs set sharenfs="options" pool/dataset?

Why are you working with set mountpoint?

BTW I've seen some weird stuff with ZFS and NFS on Linux, I've needed to set the sharenfs property to "off" and back again to the right property to get it to register with the NFS server. Showmount -e would show nothing.

Mr Shiny Pants fucked around with this message at 08:14 on Jun 30, 2016

other people
Jun 27, 2004
Associate Christ

Death Vomit Wizard posted:

I have made a noob Red Hat mistake and I'm currently stuck. I registered a RHN account for a developer (free) subscription and installed RHEL 7 (bare metal). Registered it, auto-added the subscription and everything was cool.

hosed around with it for a day, decided I didn't like my setup and wiped / reinstalled the OS. Now, when I register it, it says I don't have any subscriptions. In hindsight, the correct move was probably to unregister the first install before wiping. But what's my next move to get my subscription applied to the new install? Google has not been helpful.

You can manage your subscriptions from the Customer Portal, access.redhat.com. Just delete the old registered system and it will free up your subscription.

edit: https://access.redhat.com/management/consumers?type=system

other people fucked around with this message at 11:23 on Jun 30, 2016

Vulture Culture
Jul 14, 2003

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

Mr Shiny Pants posted:

zfs set sharenfs="options" pool/dataset?
Seems to not be working on this dataset whatsoever. I only see the export if I manually add it into /etc/exports and exportfs -r.

Mr Shiny Pants posted:

Why are you working with set mountpoint?
# zfs share rpool/netboot/stresstest
cannot share 'rpool/netboot/stresstest': no mountpoint set


Mr Shiny Pants posted:

BTW I've seen some weird stuff with ZFS and NFS on Linux, I've needed to set the sharenfs property to "off" and back again to the right property to get it to register with the NFS server. Showmount -e would show nothing.
Sort of where I'm at, except replace sharenfs with any given property and "to register with the NFS server" with "to do basically anything at all that I ask it." Real close to going BSD on this fella.

Vulture Culture fucked around with this message at 16:36 on Jun 30, 2016

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
I'm just rolling on with the silly questions today.

Is anyone running NFS on Ubuntu 16.04? I have a system that was prepped with a minimal debootstrap, and nfs-kernel-server doesn't start correctly via systemd at boot. It works fine if I start the nfs-kernel-server service later. Not entirely sure where my problem lies.

kujeger
Feb 19, 2004

OH YES HA HA
I'm not sure what exactly ubuntu does with all this, but is both rpcbind and nfs-kernel-server enabled?


what's the output of 'journalctl -u nfs-kernel-server -b' ?

Death Vomit Wizard
May 8, 2006
Bottom Feeder

Kaluza-Klein posted:

You can manage your subscriptions from the Customer Portal, access.redhat.com. Just delete the old registered system and it will free up your subscription.

edit: https://access.redhat.com/management/consumers?type=system

Thank you so much for that link. Even with your helpful answer alone, I don't I don't know if I ever would have found that page just stumbling through the Customer Portal.

Mr Shiny Pants
Nov 12, 2012

Vulture Culture posted:

Seems to not be working on this dataset whatsoever. I only see the export if I manually add it into /etc/exports and exportfs -r.

# zfs share rpool/netboot/stresstest
cannot share 'rpool/netboot/stresstest': no mountpoint set


Sort of where I'm at, except replace sharenfs with any given property and "to register with the NFS server" with "to do basically anything at all that I ask it." Real close to going BSD on this fella.

If you have a zpool named "pool" and a dataset named "dataset" you can just run:

zfs sharenfs="rw=@192.168.1.0/24" pool/dataset to export it read write to the 192 subnet.

This should automagically register it with the NFS server.

Vulture Culture
Jul 14, 2003

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

Mr Shiny Pants posted:

If you have a zpool named "pool" and a dataset named "dataset" you can just run:

zfs sharenfs="rw=@192.168.1.0/24" pool/dataset to export it read write to the 192 subnet.

This should automagically register it with the NFS server.
It should, but it doesn't. Everything related to either mountpoint or sharenfs options seems messed up on Xenial (and the problems with the NFS server alone only muddy the waters further). I'm done messing with this, and back to manual /etc/exports entries for now.

Vulture Culture
Jul 14, 2003

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

kujeger posted:

I'm not sure what exactly ubuntu does with all this, but is both rpcbind and nfs-kernel-server enabled?


what's the output of 'journalctl -u nfs-kernel-server -b' ?
No output there. There's some things about failures in dependent services like nfs.idmapd, but by the time I'm logged into the box to check on them, the dependent services are running fine. I had to jam this into rc.local to get things running on reboot:

sleep 60
service nfs-kernel-server restart


It's still not 100%, but a lot closer than it was without the sleep, where it would work maybe one out of every 20/30 reboots.

I swear, using a newish Ubuntu LTS release feels like alpha software these days, and systemd isn't making the situation easier.

Mr Shiny Pants
Nov 12, 2012

Vulture Culture posted:

It should, but it doesn't. Everything related to either mountpoint or sharenfs options seems messed up on Xenial (and the problems with the NFS server alone only muddy the waters further). I'm done messing with this, and back to manual /etc/exports entries for now.

Shame, on debian 8 it works. There are some problems with the sharing stuff though, I've read some posts on Github about it.

eonwe
Aug 11, 2008



Lipstick Apathy
so I've been teaching myself Linux and I set up a VM and forwarded port 22 traffic to my VM. I disabled it for now until I know the best way to secure it, because I don't necessarily want any traffic, login attempts, etc using port 22 to do anything just because I have something now listening to that traffic.

I was thinking of setting up a public/private key pair for use while logging into Putty, disabling password authentication and also using Fail2Ban. I did already turn off login as root remotely.

Do you guys have any other suggestions? I assume there is a lot more on the network side I could also do to protect myself a bit more, but I don't exactly know where to start on that.

Varkk
Apr 17, 2004

Good private/public key and disabling root are the main ones. That and keeping OpenSSH etc up to date. Fail2ban doesn't hurt and will reduce the brute force attempts. You can also shift the port ssh is listening on to reduce the attempts on the standard ports. Last time this came up it resulted in a few pages of arguments about how effective it was. It reduces drive by type attacks who notice port 22 open and then hammers it. But won't present much of a hurdle to someone a bit more determined.

RFC2324
Jun 7, 2012

http 418

Varkk posted:

Good private/public key and disabling root are the main ones. That and keeping OpenSSH etc up to date. Fail2ban doesn't hurt and will reduce the brute force attempts. You can also shift the port ssh is listening on to reduce the attempts on the standard ports. Last time this came up it resulted in a few pages of arguments about how effective it was. It reduces drive by type attacks who notice port 22 open and then hammers it. But won't present much of a hurdle to someone a bit more determined.

Can we recommend port knocking? :D

eonwe
Aug 11, 2008



Lipstick Apathy
wow, setting up the public/private key and disabling login via password authentication were super easy, that was fun

eonwe
Aug 11, 2008



Lipstick Apathy
Also I'm looking over my logs, and since I fell asleep last night without hardening it much, I got a LOT of attempts. I didn't see any successes, mostly a few IPs just trying all kinds of different login IDs. Root, tech, admin, pi, etc. Kinda weird thing to me, but I don't think it'll work now. Just tried to connect remotely without a key and it just immediately disconnects me.

evol262
Nov 30, 2010
#!/usr/bin/perl
For fun, you should use ForceCommand to send them to a honeypot.

Docjowles
Apr 9, 2009

Eonwe posted:

Also I'm looking over my logs, and since I fell asleep last night without hardening it much, I got a LOT of attempts. I didn't see any successes, mostly a few IPs just trying all kinds of different login IDs. Root, tech, admin, pi, etc. Kinda weird thing to me, but I don't think it'll work now. Just tried to connect remotely without a key and it just immediately disconnects me.

You never want to get complacent about security. But if you've disabled password logins, disabled login as root, and are vigilant about patching, you're pretty safe from anyone that's not a sophisticated hacker targeting you personally. In terms of SSH access, at least. If you then expose some lovely PHP app from 2009 over HTTP, that'll still be exploited and have you sending out spam as fast as your ISP can handle within the hour :v:

YouTuber
Jul 31, 2004

by FactsAreUseless
So I case of drinking while updating last night and I ran chmod -R 755 on my /etc/ folder because I saw a blurb about a file being 777 and the package manager wanted 755. Just how exactly hosed is this install now? I did a reinstall of all packages on the system but that doesn't take care of the stuff like ssh pub/private host keys. I went and manually fixed those back to 644 and 600 respectively so the SSH daemon would actually start functioning again.

This is like reinstall level fuckup? No I don't have backups because I'm an idiot.

Adbot
ADBOT LOVES YOU

RFC2324
Jun 7, 2012

http 418

YouTuber posted:

So I case of drinking while updating last night and I ran chmod -R 755 on my /etc/ folder because I saw a blurb about a file being 777 and the package manager wanted 755. Just how exactly hosed is this install now? I did a reinstall of all packages on the system but that doesn't take care of the stuff like ssh pub/private host keys. I went and manually fixed those back to 644 and 600 respectively so the SSH daemon would actually start functioning again.

This is like reinstall level fuckup? No I don't have backups because I'm an idiot.

Its generally pretty easy. You might want to spin up a VM to find the files/directories with special settings, but to fix them basically you can do the following 2 commands:

code:
find /etc -type d ! -perm 755 -exec ls -ld {} \;
find /etc -type f ! -perm -644 -exec ls -l {} \;
This will set every file to 644 and every directory to 755, which is the default. Fix your ssh settings, and then figure out how to find the other special directories(there shouldn't be many).

E: if you are using an apt based system, you can do a apt-get --reinstall install

RFC2324 fucked around with this message at 16:47 on Jul 1, 2016

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