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
skooma512
Feb 8, 2012

You couldn't grok my race car, but you dug the roadside blur.
Is there any way to tell if a drive's been encrypted or not? I want to blow away this LMDE build and replace it with something else, but I don't remember if I encrypted the data drive or not.

Adbot
ADBOT LOVES YOU

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

If you can mount the drive without decrypting it, then it isn't encrypted.

apropos man
Sep 5, 2016

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

skooma512 posted:

Is there any way to tell if a drive's been encrypted or not? I want to blow away this LMDE build and replace it with something else, but I don't remember if I encrypted the data drive or not.

taqueso posted:

If you can mount the drive without decrypting it, then it isn't encrypted.

Haha! This exchange made me laff.

e:
More seriously, if you think you've used luks to encrypt it you can run 'cryptsetup luksDump' in a terminal to examine the luks header. Use 'lsblk -p' to see your devices and if you have some listings for /dev/mapper/xxxxxx then there's more than likely some encrypted partitions there.

For example if 'lsblk -p' shows /dev/sda3 as containing some partitions mounted on /dev/mapper then the chances are that /dev/sda3 is a luks encrypted partition.

use 'cryptsetup luksDump /dev/sda3' to check.

If you're using some other stuff other than luks then I dunno offhand.

E: realised that this advice regarding the device mapper is somewhat bollocks, as you'd have devices mapped regardless of whether you're using encryption but still, it shouldn't be hard to find out.

apropos man fucked around with this message at 07:25 on Apr 10, 2017

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Company I work for has been using Redhat on production servers for years, and CentOS on our local development VMs. There's a big push to move everything to AWS and they are proposing we use Amazon Linux. I want to keep using Redhat since local VMs running CentOS are such a big part of our dev workflow. I haven't heard any good reasons why we'd want to use Amazon Linux instead, and I'm not finding a lot of information out there in my googling. What do you guys think?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

I have a Thinkpad laptop where one of the USB ports allegedly will charge (my phone) faster than the other ports, but it doesn't seem to make a difference. It came with windows installed originally, but I'm running Linux mint 18.1 on it now. I'm wondering if the OS USB host driver has control over that sort of thing and Linux is just not configured correctly to utilize it.

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum
Are you sure it's not just a port that's allowed to charge your device while the laptop is powered off or asleep/hibernating?

Odette
Mar 19, 2011

peepsalot posted:

I have a Thinkpad laptop where one of the USB ports allegedly will charge (my phone) faster than the other ports, but it doesn't seem to make a difference. It came with windows installed originally, but I'm running Linux mint 18.1 on it now. I'm wondering if the OS USB host driver has control over that sort of thing and Linux is just not configured correctly to utilize it.

Are you able to map out the hardware config? That single USB port could be on it's own bus, therefore it could have access to a bit more juice than the other (shared) bus. That's the first place I'd be looking.

Which Thinkpad model is it? I'd be interested in poking around in the manual/docs.

CaptainSarcastic
Jul 6, 2013



peepsalot posted:

I have a Thinkpad laptop where one of the USB ports allegedly will charge (my phone) faster than the other ports, but it doesn't seem to make a difference. It came with windows installed originally, but I'm running Linux mint 18.1 on it now. I'm wondering if the OS USB host driver has control over that sort of thing and Linux is just not configured correctly to utilize it.

What are you trying to charge? To really fast-charge you want something that is putting out at least 2 amps at 5v, and a quick read of the USB specifications suggests that even a USB 3.0 port isn't going to put out more than 1.5 amps. I haven't checked to see if there is a noticeable difference in the charging between my USB 2.0 and 3.0 ports, largely because I use a charger plugged into a power strip next to my desk for charging my phone and tablet.

Check the charger for whatever you are plugging into the laptop and see what the amp rating on it is. My newest phone and tablet chargers both put out at least 2.1 amps, which it doesn't look like USB ports are configured to reach.

xzzy
Mar 5, 2009

No, to get the fast charging you're going to need a dedicated charge device. USB spec can't deliver the amps modern phones ask for, which is why none of the high output stuff can handle data.

Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE

peepsalot posted:

I have a Thinkpad laptop where one of the USB ports allegedly will charge (my phone) faster than the other ports, but it doesn't seem to make a difference. It came with windows installed originally, but I'm running Linux mint 18.1 on it now. I'm wondering if the OS USB host driver has control over that sort of thing and Linux is just not configured correctly to utilize it.

I know what you're talking about and that's my understanding too.

IIRC the logic works like this - USB devices actually need to negotiate their power delivery. The base standard is something super low (5V100mA = 0.5W?). The base standard requires that ports allow negotiating up to 5V@1A = 5W. However there are additional power delivery specs which allow the device and port to negotiate much higher levels (up to 20V @ 5A = 100W). Later specs might also have integrated some of these power-delivery requirements, which is one possible answer to your question.

That said - there's no guarantee that your device will actually attempt to negotiate that much power. Or that the device and port can agree on doing so - typically this involves stepping up the voltage, and if your device doesn't have USB-C support it may not really support that level of step-down conversion (and even then, it may not negotiate that over a non-Type-C connection).

Honest answer? It's meant to allow you to plug in a 2.5" or 3.5" HDD to a single port without needing one of those splitter cables to plug into 2 ports to get enough power. External HDDs run at 12V internally, so stepping up the voltage at the bus is the obvious answer.

But yeah, I know from my Thinkpad that it's definitely possible to toggle the yellow USB port on the back to stay on all the time, while it is not possible on the USB 3.0 ports on the left side. I've always attributed this to a different reason - the USB 3.0 ports are basically on a separate controller chip since the PCH did not integrate USB 3.0 functionality at that time the chassis was designed (510-series generation). As such, you can't boot from them, they don't stay powered when the laptop is off, etc.

CaptainSarcastic
Jul 6, 2013



Paul MaudDib posted:

I know what you're talking about and that's my understanding too.

IIRC the logic works like this - USB devices actually need to negotiate their power delivery. The base standard is something super low (5V100mA = 0.5W?). The base standard requires that ports allow negotiating up to 5V@1A = 5W. However there are additional power delivery specs which allow the device and port to negotiate much higher levels (up to 20V @ 5A = 100W). Later specs might also have integrated some of these power-delivery requirements, which is one possible answer to your question.

The specs are to have ports rated at up to 5 amps, but they specifically limit the actual amount actually allowed to be drawn to 1.5 amps.

Buffer Overflow
Sep 3, 2006
Interweb Addict

fletcher posted:

Company I work for has been using Redhat on production servers for years, and CentOS on our local development VMs. There's a big push to move everything to AWS and they are proposing we use Amazon Linux. I want to keep using Redhat since local VMs running CentOS are such a big part of our dev workflow. I haven't heard any good reasons why we'd want to use Amazon Linux instead, and I'm not finding a lot of information out there in my googling. What do you guys think?

The RHEL instances cost more would be the biggest reason I could think off.

Docjowles
Apr 9, 2009

The big reason would be that Amazon Linux and CentOS are very different distros at this point. So your dev and prod environments would not be comparable and testing will be a pain.

I would push to just run CentOS everywhere. If they find Amazon Linux acceptable then clearly they don't care about the support angle for RHEL. So no reason to pay more for it.

Horse Clocks
Dec 14, 2004


Is there a cross shell/x/wayland way of setting up environment variables for your entire session?

X had .xprofile (or some other .x prefixed script). But that's not gonna work with wayland.

.pam_environment is meant to work on login, but for some reason I've only seen it work on second login for me (and this is without encrypted home).

And then, what's the correct way of setting environment vars based on application output (primarily gpg-agent setting SSH_AUTH_SOCK)?

It seems like wayland fixes some things. But breaks a load of others in the process. What could once have been done by a host of smaller components, now you have to wait for your WM (rather, compositor) to implement because it now does everything.

Plasmafountain
Jun 17, 2008

M0nBfaQMhPbptK2z0soo
VboqjdEaMfpPgp8VlhUs
peSFA0N91tbybxb1LSpm
qD3MzR9EOYg4jx5tHH8s
4yQ8DNGPp2DEO9RdlPPH
F1nS3KfTGfZLDX5tu0fM
cneZ92PHJKW8q6JAiTyG
fKAbDl7i1Acjy1oEOf09
qzGX9JZrNoVJZTI5dxtm
p0h31UN4RA0FpsM29opp

Plasmafountain fucked around with this message at 23:53 on Feb 27, 2023

Methanar
Sep 26, 2013

by the sex ghost

Zero Gravitas posted:

Can somebody give me a quick run down on what I need to do to take a virtually virgin fedora 25 install and set things up so I can share files from my Win 10 computer to and from this Fedora machine over my LAN? I'm apparently able to find thousands of videos/articles except the one I actually need.

Neither my windows computers appear on the fedora machine and the fedora machine doesnt appear on the windows computers.

Can your machines ping each other? You may need to turn on device discovery on windows for it to automatically appear, just search device discovery in the start menu.

You can use either NFS or Samba for your file share, samba is probably what you want so:

Go through the usual process of sharing a folder in windows. Create a folder, right click properties. Sharing > Share. Type in 'everyone' and give it Read/Write.

Then on your Fedora side yum install samba-client then try to navigate to smb://<ipOfWindows>/<shareName>. You might be prompted for credentials. In that case it's <windows hostname>\<windows username>

Roargasm
Oct 21, 2010

Hate to sound sleazy
But tease me
I don't want it if it's that easy

Zero Gravitas posted:

Can somebody give me a quick run down on what I need to do to take a virtually virgin fedora 25 install and set things up so I can share files from my Win 10 computer to and from this Fedora machine over my LAN? I'm apparently able to find thousands of videos/articles except the one I actually need.

Neither my windows computers appear on the fedora machine and the fedora machine doesnt appear on the windows computers.

Just use WinSCP with a cert, SMB shares are bad and keep coming up over and over in Windows exploits

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.

Roargasm posted:

Just use WinSCP with a cert, SMB shares are bad and keep coming up over and over in Windows exploits

I understood he wanted to share the files on the Windows-computer, so that would require installing SSH-server on the Windows, that would be foolish. And transferring files with SCP is horrendously redious when you can just mount the share and use the file the same way you use any other file on the computer.

And millions of companies seem to manage to use SMB shares without major problems. At work we have tens of thousands of users using our SMB shares daily and they haven't been a security problem since Blaster. Except just in the past month when we've tried to disable SMB1 and all sort of stuff stopped working. :bang:

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
I'm doing it the other way round and have an smb share running on an Ubuntu box.

I restricted it to password access in smb.conf just so that when I want to pull a file into Windows I have to type a password. It's no biggie and mitigates Windows doing anything to my smb files of its own accord.

ToxicFrog
Apr 26, 2008


Saukkis posted:

I understood he wanted to share the files on the Windows-computer, so that would require installing SSH-server on the Windows, that would be foolish. And transferring files with SCP is horrendously redious when you can just mount the share and use the file the same way you use any other file on the computer.

And millions of companies seem to manage to use SMB shares without major problems. At work we have tens of thousands of users using our SMB shares daily and they haven't been a security problem since Blaster. Except just in the past month when we've tried to disable SMB1 and all sort of stuff stopped working. :bang:

In my experience installing an SSH server on windows is easier than getting SMB to work reliably.

Although right now I'm dealing with the opposite problem, where I'm running smbd on a linux machine and I can't mount it from windows -- it rejects all attempts to log in. It was working fine last week. :suicide:

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
My Linux hosted smb share sometimes takes a good few seconds to ask for the password in Windows. It negotiates almost immediately from another Linux box.

Secx
Mar 1, 2003


Hippopotamus retardus
Systemd question. I ran this

code:
systemd-run --on-active="1h" --uid=`id -u` --gid=`id -g` `which flexget`
trying to get a task to run every hour, but I changed my mind, so I want to remove it. If I run systemctl list-timers --all I get:

code:
NEXT                         LEFT          LAST                         PASSED               UNIT                         ACTIVATES
Mon 2017-04-17 16:36:06 EDT  2h 54min left Sun 2017-04-16 16:36:06 EDT  21h ago              systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Mon 2017-04-17 20:07:27 EDT  6h left       Mon 2017-04-17 11:31:59 EDT  2h 9min ago          apt-daily.timer              apt-daily.service
n/a                          n/a           Sun 2016-05-08 13:39:24 EDT  11 months 9 days ago ureadahead-stop.timer        ureadahead-stop.service

3 timers listed.
Did my original task not get scheduled? I don't recall any error messages when I ran systemd-run. If it is still scheduled, what can I run to remove it?

This is on an Ubuntu 16.04 system.

Plasmafountain
Jun 17, 2008

fSMnP2YMmMQHJ4OP9JtP
8Xa6nlQ6pEOpKoZY5jCW
Sd6bWYDjrplzW6MzkkQr
TncWqFWPIaFezyskCJBd
HBgunp51K80WotrSX2Ud
MOHnCfSsCKocSpm1C9wh
qh6598WcQBJz7XdhhYMi
nX0N5oSRdUlIz4bHL08p
lzaI44qqxjDcGcf5knDp
Go5HTYQS72u1PKQUbnez

Plasmafountain fucked around with this message at 23:53 on Feb 27, 2023

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

Zero Gravitas posted:

I can ping either machine from the other.

After dicking around in the Sharing menu on the Fedora machine, the FM sharing folders for images and videos shows up on the W10 machine, but nothing else. If I try and open "Windows Network" in Files: "Unable to access location; failed to retrieve share list from server: no such file or directory" which googling for simply tells me that Samba isnt working.

If I right click on a folder on my FM and select properties, I dont get an option to enable network sharing, just "Basic" and "Permissions".

I have an entire terabyte drive on WM marked for sharing with open as gently caress permissions for loving everyone/thing.

Nothing is working.
What do your iptables/firewalld rules look like?

ToxicFrog
Apr 26, 2008


apropos man posted:

My Linux hosted smb share sometimes takes a good few seconds to ask for the password in Windows. It negotiates almost immediately from another Linux box.

Yeah, in this case what happens is it asks for the password, I enter my username and password (set with `smbpasswd`), and it says "invalid login". I've tried both username and "WORKGROUP\username". It was working fine last week!

I've been able to enable guest access, so I have read-only access and that's sufficient 99% of the time, but still. It's aggravating, and aggravations like this are characteristic of every time I've tried to use SMB even when all the machines involved are running the same version of windows.

Plasmafountain
Jun 17, 2008

ubdplYa4hZzACqNSsJAt
tNZwQd1wetnO3MqyAsB8
qt14hz7bQZeSIRvkpGRb
ZocQipyVSaxbjR85xFmU
edpGzCoRs8QWOOR3P7me
Zcqj8tEihOid1Ebpoosa
eZoMlCo39BnyMd4F2IWR
wrxciphraAzXHy2rwpHJ
kdqy2smYLKeMN2Xl6Bp1
IMgB56eyDmbdDQlgxWAO

Plasmafountain fucked around with this message at 23:53 on Feb 27, 2023

Tigren
Oct 3, 2003

Zero Gravitas posted:

I can ping either machine from the other.

After dicking around in the Sharing menu on the Fedora machine, the FM sharing folders for images and videos shows up on the W10 machine, but nothing else. If I try and open "Windows Network" in Files: "Unable to access location; failed to retrieve share list from server: no such file or directory" which googling for simply tells me that Samba isnt working.

If I right click on a folder on my FM and select properties, I dont get an option to enable network sharing, just "Basic" and "Permissions".

I have an entire terabyte drive on WM marked for sharing with open as gently caress permissions for loving everyone/thing.

Nothing is working.

As anthonypants already alluded to, you might need

# firewall-cmd --permanent --add-service=samba
# firewall-cmd --reload

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

Zero Gravitas posted:

iptables --list-rules :
Are you using iptables or are you using firewalld?

Plasmafountain
Jun 17, 2008

i7LBX8xetSKXpentC3vh
OSe2n1a4XVBdL8bdym3K
YIUcv8jjOAqjCtkKXctb
lXGTl28G4qvdDfAMP3xY
ogvgA2XBdYz7P4LcFWw5
stHlb51M8bZuw0pZR5XL
X3cKfjgm0YXiRmkbillC
3w5OCvMteLZ4zGApcAus
YYt8tvjk9EKTg3fUtmq8
9eMYdxtSJPE72ETDkOjT

Plasmafountain fucked around with this message at 23:53 on Feb 27, 2023

skooma512
Feb 8, 2012

You couldn't grok my race car, but you dug the roadside blur.
There's also something you need to do to get SELinux off your back. I had to exactly what you're doing a couple weeks ago and me taking all afternoon to do one simple thing on Linux is as true on Fedora in 2017 as it was on MEPIS on 2005 :v:


http://forums.fedoraforum.org/showthread.php?t=174473

Also be sure to allow nmb as well as smb through the firewall. That's what tripped me up too. For some reason I couldn't find one tutorial that took me from zero to operational, I had to use like 4 different ones to get me there.

skooma512 fucked around with this message at 22:12 on Apr 17, 2017

Marinmo
Jan 23, 2005

Prisoner #95H522 Augustus Hill

skooma512 posted:

There's also something you need to do to get SELinux off your back. I had to exactly what you're doing a couple weeks ago and me taking all afternoon to do one simple thing on Linux is as true on Fedora in 2017 as it was on MEPIS on 2005 :v:
It's telling SELinux that yes, I want samba to be able to access these files.

Fedora wiki says:

https://fedoraproject.org/wiki/SELinux/samba posted:

FILE_CONTEXTS
SELinux requires files to have an extended attribute to define the file
type. Policy governs the access daemons have to these files. If you
want to share files other than home directories, those files must be
labeled samba_share_t. So if you created a special directory /var/eng,
you would need to label the directory with the chcon tool.

chcon -t samba_share_t /var/eng

Yes, for home use it's loving retarded and obnoxious. Oh and if you're using NTFS? gently caress you.

Plasmafountain
Jun 17, 2008

afmp9NyYeG3kSOqUliZD
1luELYLZFStqWFTuCoGG
bTfIcD9l0mrUtUqC72fH
8ieG7SPeHlbc1iVgxzSb
dhIm1fjn2yMetZyFtdtR
3rr95MfejNKtwJEFUgVq
QAt5KnfR7gA4ZSoIb5J2
uvhwZgt46I9lPNbbva0r
7xw0iFP3zqHsqerDYZrQ
ccvJj1v7NnBVyv1dYcnY

Plasmafountain fucked around with this message at 23:54 on Feb 27, 2023

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

Zero Gravitas posted:

Ok, so I dont know what nmb is or how to allow it through the firewall; or what exactly I'm supposed to be doing here since that forum link is *ten loving years old* (jesus loving christ why is this still a thing for such an elementary thing to do at home after ten bloody years) and the linked tutorial on it is a dead link.

Trying the lines on the SElinux wiki throws me a bash syntax error for the File Contents section on an "unexpected token '/.*' "

gently caress me sideways I'd offer $50 for someone to remote in and fix this loving thing for me if I wasnt sure that setting up a remote session wouldnt balls itself up
Is there a trailing slash on your command?

Plasmafountain
Jun 17, 2008

X7hYIvJINaGFBRx5G8Ss
Q9pHkWoOBwWd8PKA1xXv
os1gYujBHeg23bztgq2I
Xrl5Y5G0gG4ctx0dhUvt
CiQqtxJIdiZvIjFZW3QU
X3npWBYlynvyn9IU5uAs
I1NZppe0XOfP4ArBlEFy
nRQopoOZv9V7ey4HrmAY
etvKee71hfgBXB5cwUta
RKhsxqQa0GOhymafSvr9

Plasmafountain fucked around with this message at 23:54 on Feb 27, 2023

jre
Sep 2, 2011

To the cloud ?



Zero Gravitas posted:

code:

[chris@colossus ~]$ /home/chris/Transfer(/.*) system_u:object_r:samba_share_t:s0/
bash: syntax error near unexpected token `/.*'
[chris@colossus ~]$ /home/chris/Transfer/(/.*) system_u:object_r:samba_share_t:s0
bash: syntax error near unexpected token `/.*'
[chris@colossus ~]$ /home/chris/Transfer/(/.*) system_u:object_r:samba_share_t:s0/
bash: syntax error near unexpected token `/.*'

Apparently not liking the parentheses.

What are you expecting
code:
 /home/chris/Transfer/(/.*) 
to do ?

Are you trying to fix the selinux context of the files in /home/chris/Transfer/ ?

Plasmafountain
Jun 17, 2008

WHX6Cv8ozAKc9y4yf92w
vdnOOiHZfChX23P8vOYP
f0984dpCuO64mm96oIZH
gV31HuvbNiyp8N3cEdEU
2PERyZcNArrk6vVVvmnk
o1COdSI3vtUSyq3iimu1
Ik58yf9MAhNiwofClufn
DgPIhCyuoo1bHmFjdkDA
fcr82CE5wzYHjmK6p2eT
0SegwOAYKQ5lxx69XxrK

Plasmafountain fucked around with this message at 23:55 on Feb 27, 2023

evol262
Nov 30, 2010
#!/usr/bin/perl
Put it in permissive:

setenforce 0

See if it works.

If it does, just use 'audit2allow -a' to generate your policy files and apply those. If not, troubleshoot elsewhere.

jre
Sep 2, 2011

To the cloud ?



What's the context on the files just now, you can check with
ls -Z /home/chris/Transfer

edit: trying permissive first to see if it's actually an selinux problem is the best idea ^^^^^^^

jre fucked around with this message at 23:21 on Apr 17, 2017

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.

Zero Gravitas posted:

At this point I'm randomly mashing poo poo into the console to see if it works, in good old cargo cult style.

I had thought I was working through the steps in: https://fedoraproject.org/wiki/SELinux/samba to get this loving thing to work.

By mashing that in I thought I was adding that folder to the SElinux policy list for allowing SAMBA to share it after having labelled it with the preceding chcon command.

It sounds like you are trying to run '/var/eng(/.*)?' from that guide. It's not a command that can be run. Below are the commands you can try, although the syntax for semanage is quite unusual:

code:
chcon -t samba_share_t /home/chris/Transfer
semanage fcontext -a -t samba_share_t "/home/chris/Transfer(/.*)?"
restorecon -R -v /home/chris/Transfer/

Adbot
ADBOT LOVES YOU

Plasmafountain
Jun 17, 2008

0fxYbYL7qy7sifc7qeHW
5DuxFlgpFdhjdUGrvdiz
yEvSk0fuasrPKlRjRNMr
bbXbnk7NQvEaGa75UCYj
vwM3x9w5XdwH2439uDcl
OE1EWH1WWSu7HxrTWAiC
NLnueNsdp0pOFNu10cWJ
XHQyi9KrLdGRJkP6uDsx
UTg2Qc4qUTJ4bT9aAaL0
TOS0pfZkyOh5lCycRhi0

Plasmafountain fucked around with this message at 23:55 on Feb 27, 2023

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