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
Hypnobeard
Sep 15, 2004

Obey the Beard



My company is migrating a number of RHEL5.5 servers from one data center to another. As part of this we're being asked to construct replica servers from scratch that exactly match the existing servers. Is there an easy way to mimic the installed packages between the two servers? We have other means to mirror the configuration, but the actual packages installed is giving us problems.

Basic googling about yum doesn't really show anything, but I'm a linux newbie and I'm sure I'm not googling for the right thing.

Adbot
ADBOT LOVES YOU

Hypnobeard
Sep 15, 2004

Obey the Beard



spankmeister posted:

rpm -qa will give you a full list of installed packages.

Is it just a matter for reformatting that and feeding it back into yum or rpm on the new server, then?

What I'm trying to figure out is if there's a way to at least partially automate the process rather than trying to do these by hand.

Hypnobeard
Sep 15, 2004

Obey the Beard



spankmeister posted:

Sure, if you do
code:
rpm -qa | awk '{printf $0" "}' > pkgs.txt
it will list all packages on one line with a space after each, and put it in file pkgs.txt

You can put that in a file then do:
code:
yum install < pkgs.txt
that should do it.

Fantastic! Thank you very much.

Hypnobeard
Sep 15, 2004

Obey the Beard



We have an odd DNS client issue with some RHEL5.5 servers. We're shifting the nameservers to retire some old appliances. We've updated resolv.conf with the new nameserver IPs and commented out the old ones. named and network are restarted, but the old nameservers still show DNS requests from the servers until a reboot.

What else do we need to restart/modify to clear the old nameservers completely?

Hypnobeard
Sep 15, 2004

Obey the Beard



Thanks for the information. I'm not sure if that's going to be easier or harder to get permission to do than just rebooting the VMs. Have to get with the web guys and find out what they're doing.

Hypnobeard
Sep 15, 2004

Obey the Beard



I'm responsible for a couple of RHEL6.7 servers here at work. Security has recently asked that we move five directories (/tmp, /var, /var/log, /var/log/audit, and /home) to separate partitions.

I've gotten the space allocated and the logical volumes created for each directory (appropriately sized), but I'm a bit stumped as to the procedure for safely moving the data from the existing directories to the new location and then ensuring the mount points move.

Can anyone point me at the appropriate documentation, or give me a rundown? Thanks.

Hypnobeard
Sep 15, 2004

Obey the Beard



evol262 posted:

Change fstab to reflect the new volumes. Bring it up in single user or write a dracut module (I can probably give you basic code for one if you want) to move /var/log and /var/log/audit before any of the normal logging/auditing starts, unless you don't mind losing a little bit. Use tar or rsync's archive option (or cp -p, maybe, depending on what you've got going on there) to move stuff over

How do I access the old locations if they're mounted on the new (currently empty) partitions? Does single-user mode enable this somehow?

Hypnobeard
Sep 15, 2004

Obey the Beard



evol262 posted:

Because you can unmount the new locations (which unmasks the old data), and mount them somewhere else (/tmp/new or whatever -- your tmp is probably tmpfs and doesn't need any copying), without worrying about losing logs from important services/wtmp/audit/whatever

OK. So it's:

1) Modify fstab with the new devices/mounts.
2) Reboot into single-user mode.
3) Unmount new locations and remount them to like /mnt/whatever.
4) Copy data w/rsync from old location to new location.
5) Reboot back into multi-user.

Correct?

Thanks for the all the help; DISA STIG is no fun to implement if you're trying to backfit it.

Hypnobeard
Sep 15, 2004

Obey the Beard



Anyone have any opinions on Ubuntu releasing their snap package for a bunch of distros today? I know app packaging can be a contentious topic, but I'm curious if this is actually an improvement or Yet Another Packaging System.

Hypnobeard
Sep 15, 2004

Obey the Beard



I'm trying to play around with Fedora 25 on a Lenovo laptop, and I'm having difficulties with the wireless adapter not being recognized.

It's a Broadcom BCM4352. I can't seem to find anything more current than Fedora 23 for getting it installed, and using the packages from rpmfusion.org hasn't resolved the issue.

Am I just SOL because lol Broadcom? Or are there steps I can look into to get in working? I'm a reasonable newbie to Linux, so be gentle.

Hypnobeard
Sep 15, 2004

Obey the Beard



evol262 posted:

Is wl loaded? Using akmod-wl or kmod-wl?

I did install kmod-wl, but I'm not sure how to check if wl is loaded. Is that modprobe wl or some other command?

Hypnobeard
Sep 15, 2004

Obey the Beard




No, does not appear in that listing.

So the next question would be how to get it installed/loaded?

Hypnobeard
Sep 15, 2004

Obey the Beard



modprobe's coming back with:

Module wl not found in directory /lib..

which I guess tells me there's something wrong with the installation.

Hypnobeard
Sep 15, 2004

Obey the Beard



Hypnobeard posted:

modprobe's coming back with:

Module wl not found in directory /lib..

which I guess tells me there's something wrong with the installation.

Can anyone tell me what I should be installing for this? I feel like I just missed the right package, and my google-fu is weak.

Hypnobeard
Sep 15, 2004

Obey the Beard



evol262 posted:

akmods --force? Along with akmod-wl.

You can check whether or not "kmod-wl" matches "uname -r", though. RPMFusion's kmods aren't always up to date.

So this and the other reference to the arch forum eventually led me to figure out my problem: I hadn't disabled secure boot and OS optimizations in the laptop's BIOS. Disabling this let the wl driver load just fine and all was fixed.

Thanks for the help!

Hypnobeard
Sep 15, 2004

Obey the Beard



Can anyone here recommend a decent Linux-friendly USB wireless adapter? Ideally Fedora 25 compatible, but really I'll take anything that's well-maintained. The Broadcom card built into my laptop is just too much of a headache.

Hypnobeard
Sep 15, 2004

Obey the Beard



What's the current recommended study guide for the RHCSA exam?

Hypnobeard
Sep 15, 2004

Obey the Beard



evol262 posted:

Other than the official one, there are 2 books.

Jang had been good in the past. I reviewed the RHCSA section (and got distracted before I finished the RHCE section) of the other in the book thread floating around here.

Short answer is that both will get you past the test. Long answer is that 10-80% of the exposition in either book is outdated, flat-out wrong, or both, and you shouldn't believe their lies about why things are done a certain way.

My review of the RHCSA section in the other thread details what he got wrong, specifically. I haven't done it for Jang (and am not likely to)

E: nevermind, re-read your response, realized I missed the callout to the book thread.

Thanks!

Hypnobeard fucked around with this message at 15:44 on Apr 6, 2018

Hypnobeard
Sep 15, 2004

Obey the Beard



What could prevent root from being able to delete a file?

Selinux is permissive, the file is not immutable, the directory is not immutable. Nothing is locking the file as far as I can tell.

What else should I look at?

RHEL 7 if it matters.

Hypnobeard
Sep 15, 2004

Obey the Beard



RFC2324 posted:

what kind of filesystem? What kind of media?

Ext4, vdisk.

Hypnobeard
Sep 15, 2004

Obey the Beard



rt4 posted:

Mounted readonly?

Doesn't appear so. /proc/mounts shows rw.

Hypnobeard
Sep 15, 2004

Obey the Beard



Computer viking posted:

And just as a test, if you touch a new file in the same directory, can you delete that?

I can, yes.

Hypnobeard
Sep 15, 2004

Obey the Beard



isaboo posted:

Dear Hypnobeard,

Can you verify the secret word for your account?

Your ticket number is 42069

Best regards


e: wow what a terrible snipe. here is a webcam of your support agent



Honestly I slipped into "answer the script questions so you don't get angry asking for escalation" mode for a bit. Too many years as a computer janitor.

Hypnobeard
Sep 15, 2004

Obey the Beard



Odd SSH error:

We have a security compliance scanner that uses SSH public keys to connect to various boxes to run various tasks. When connecting to a specific RHEL 7 box, it completes the key exchange and authenticates successfully, but then immediately after executing a command the connection is dropped.

Jan 7 09:09:24 server sudo: our_user : TTY=pts/1 ; PWD=/home/our_user ; USER=root ; COMMAND=/bin/sh -c printf "command_start_%s" "nOMpQPKf"; netstat -a -n; printf "command_done_%s" "6qNTMuwy"
Jan 7 09:09:24 server sshd[22959]: Read error from remote host 10.1.1.44 port 50620: Connection reset by peer

The user executing the command has the appropriate sudo rights.

Anyone have any idea what could be causing this?

Increasing debug logging doesn't give us anymore insight, unfortunately.

Adbot
ADBOT LOVES YOU

Hypnobeard
Sep 15, 2004

Obey the Beard



Pablo Bluth posted:

As it's redhat, SELinux?

Sorry, should have included: SELinux is (temporarily) disabled.

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