What’s my MAC Address in a Command Prompt?–#SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

The other day I was working with a licensing issue and someone requested my MAC address to track something down. I know I could dig into the adapter properties, but that’s an annoying set of clicks in Windows. I decided to spend that time checking out how to get the MAC address from a command line.

Normal CMD

I tried “ipconfig” at the command line, which I always have open. I got my IP and DNS info, but no MAC. A quick search on Google showed me I needed more detail.

ipconfig /all

This gives me all the info, as you can see below:

2021-10-25 09_38_29-cmd - flyway  info -url=_jdbc_sqlserver_____db=demo_db&user=_

PowerShell

I’d prefer PowerShell for many things like this, mostly because I could programmatically extract the values and use them elsewhere. I don’t need that here, but I might for something.

In this case, this is in the WMIObject, which is an ugly command. I’ll never remember this.

Get-WmiObject win32_networkadapterconfiguration | select description, macaddress

However, there’s an easier cmdlet.

Get-NetAdapter |select MacAddress, Name

This will return what I want. I get see which MAC is associated with which adapter.

2021-10-25 09_42_55-C__Users_Steve

Both quick ways to get some information.

SQLNewBlogger

I had to get some info, and I took a minute to learn something. This took me just 2-3 minutes to learn how to do this and practice. Then it was less than 10 minutes to do this post.

For reference, I used these links:

Posted in Blog | Tagged , , | 1 Comment

Security Bug or Handy Feature

There are plenty of times that I want to share something with another person. This could be a link, a slice of data, or maybe the view of some page I’ve seen. Many applications make this easy, either on the Internet, or inside a company in Slack or Teams.

However, there are lots of times that I might want to share some data publicly, allowing anyone to get to it. That’s a place where no shortage of data breaches have taken place, a problem we still grapple with today. It’s not a “make-a-decision-once” problem either. I could set up some data for access to specific people using permissions. Then someone later changes to anonymous public access, mistaking some dataset that is sensitive for one that can be exposed. Likewise, I could have a dataset that I have set to be publicly available change, with sensitive data added later. The individuals adding the data might not be aware that this particular set is being shared without any controls.

I ran across this piece about PowerApps, noting that datasets can be configured for anonymous access if a list doesn’t have table permissions enabled. That’s an issue, as often enabling something looks like work. Many people often seek to avoid work and just complete a task as quickly and easily as possible. In many cases, they may not bother with enabling table permissions. Fortunately Microsoft later enabled permissions by default, but there are still cases of data owners exposing sensitive data.

Misconfiguring access is a big problem overall, and the best solution I see is to ensure data is classified and tagged. We can then build applications that have policies set on the way they handle data. If data were classified as PII or sensitive, then an app (like Power Apps), could refuse to allow anonymous access to be configured. Classifying data, however, is a tedious, boring, awful job. Even if this is easy to do across time, it’s not a job anyone wants. However, this is part of the data lifecycle, and I don’t know that we will get better data security and limit the exposure of data until we have a way to easily classify and tag data that allows applications to make decisions on how to use this data.

My employer makes a product to help here, and I’ve been pleasantly surprised that more and more customers are looking at doing this. However, we then need to ensure that applications can use these classifications  in an actionable way to protect data.

Microsoft has talked about enhancing that the TDS protocol and their software to read and use read classification data, which is lightly gathered in SQL Server. They have a Purview product, which also helps, but the best solution, in my mind, is an open API. This would allow for connections to any classification service. Developers and admins could submit classifications for database structures or even files in real time (and hopefully programmatically). Applications could access this data and then determine what controls should be applied. Ideally, they would also refuse access if data wasn’t classified.

I don’t know that we’ll get here, but I do see some movement from a variety of vendors here, usually limited to the database space. Hopefully this will continue to grow over time and prevent some of the silly data breaches we have where someone mis-configures a data store and allows anyone to access it.

Steve Jones

Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

Posted in Editorial | Tagged , | Comments Off on Security Bug or Handy Feature

Daily Coping 27 Oct 2021

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

Today’s tip is to find a new perspective on a problem you face.

There are always problems we are dealing with in life. Some at work, some in our families, some might be personal. It’s easy to get locked into a particular view of an issue and not think more widely about how to tackle things.

I actually have started to try and think differently about things, and part of the reason is this routine from Tom Segura (NSFW). The end is the best part, because he turns the entire story around. He looks at it from a new perspective. Rather than being insulted, he enjoys the routine.

I recently had an issue at work. It was a problem with the way I interacted with another team, and I was feeling frustrated. In this case, I had to walk away from the computer for a bit and try to calm down.

At some point I thought about this routine and decided to look at things a different way. This team wasn’t trying to be difficult, and they had their own issues related to my challenge. I decided to think about how I could approach the problem in a new way and try to get what I needed, as well as make things easier for this team.

I made some progress, and I had to accept the problem a bit for the part I couldn’t change. However, the entire experience was better for me when I took a new approach.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 27 Oct 2021

Daily Coping 26 Oct 2021

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

Today’s tip is to share a hopeful quote with a friend or colleague.

I’m not sending this to anyone in particular, but sharing more widely here. I love flipping through quotes and usually send them to others on their Facebook birthday. Today, I want to share one that caught my eye and is a variation of others that I believe in:

Your present circumstances don’t determine where you can go; they merely determine where you start. – Nido Qubein

Things don’t always go our way, and sometimes the way forward from here feels overwhelming and tough. We can lament where we are, rather than looking forward and trying to figure out where we want to go.

I often see this in software. We can get caught up in how we got here, or the problems of today, rather than looking forward for future solutions.

Don’t be bound or defined by today. It’s one of the thousands of steps on a journey.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 26 Oct 2021