Tuesday, December 5, 2017

Finding out what port devices are plugged into: Cisco

Telnet to switch
login,
(it would be a good idea to enable logging before running these)
enable

switch#>sh arp

this will give the mac/ip list

switch#>show mac address-table

This will give mac/port

I enabled logging so I had a notepad with all the data.
Manually went in and made it a CSV, there might be a way to do this automatically, but I didn't do it that way...

In the end, after manipulating the data in excel, I ended up with a workable list of IP, MAC, and Port numbers.  I figured nslookup is easy enough to find out what the device is via the IP, but I guess you could go to DNS/DHCP also.

Wednesday, November 15, 2017

Xerox Workcentre not pingable by Hostname

Requested Host Name is not verified, have you seen this on your Xerox WorkCentre?
Well I finally got this working.

In my environment, I have assigned all my printers a static IP address, which is then shared through a print server, I know, revolutionary right?
In the near future we'll be going through a re-IP, so my static assignments aren't going to work. On all my other printers (HP, Ricoh, Brother) I was able to add a host name, ping the host name, and share the printer via a port based on that hostname instead of the IP. Now I can put that printer into DHCP, ready for the re-ip.

The Xerox did not want to play. And the kicker, the Xerox printers aren't in the office I'm in. So I was afraid to go DHCP and lose connection.
Luckily I work with some pretty smart people, and it was suggested I put a reservation for the device based on its MAC. Brilliant.
So I did that, went to DHCP, success. It pulled the right address and I was connected. The other cool part is the Host Name verified.
Ping test? success!

This re-IP might not be that bad after all.

Wednesday, November 8, 2017

Enabling Telnet on cisco switch

After setting up my switch I could ping it and access the UI, but couldn't Telnet into it, because I didn't turn it on...

switch>enable
switch#config t
switch(config)#line vty 0 4
switch(config-line)#password <password>
(this doesn't require the <>, you just put the password. Ex, if you want the password to be Password1 it would look like this:
switch(config-line)#password Password1
that's it)
switch(config-line)#login
switch(config-line)#end

now test it

switch#telnet (IP of switch)

once connection is verified, save it.

switch#write memory
switch#copy running-config startup-config

Double saved.

Monday, November 6, 2017

Making Cisco switch pingable

If you're like me, you went through the initial setup wrong and need to do the following:

 (remember to enable)

Switch# write erase Erasing the nvram filesystem will remove all files! Continue? [confirm]y[OK] Erase of nvram: complete Switch# Switch# reload

This will run for a while... a long while

In my case, I wanted to assign an IP to the vlan 1 (why? I don't know, I just did OK?)

Ok, so after that:
switch#config t
switch[config]#interface vlan 1
switch[config-if]#ip address x.x.x.x x.x.x.x
(second set of x.x.x.x for subnet)
switch[config-if]#exit
switch[config]#ip routing
switch[config]#show running-config
(make sure ip routing is listed)
switch[config]#interface vlan 1
switch[config-if]#ip address x.x.x.x x.x.x.x
switch[config-if]#no shutdown
switch[config-if]#exit
switch[config]#exit
switch#write memory
switch#copy running-config startup-config
(hit enter on the save prompt)

now that IP routing is turned on, you won't be able to ping from another subnet... until:

switch#config t
switch[config]#ip route 0.0.0.0 0.0.0.0 (ip of router)

Friday, October 6, 2017

Make DomainA see DomainB

Able to ping each other by IP, not able to ping by name.

Make sure one of the hardcoded DNS servers is the servers IP or 127.0.0.1.

Open DNS manager
Right Click Forward Lookup Zones

Defaults click next all the way through, zone name DomainName (.corp,.com,whatever)
Expand the new zone
Right click, New Host (A) name

Name of server and IP address

Pinging between via name works now.

Thursday, September 28, 2017

Cisco Anyconnect VPN Failed to get configuration from secure gateway

Out of the blue, users start getting these errors.
Failed to get configuration from secure gateway. Contact your system administrator.

AnyConnect was not able to establish a connection to the specified secure gateway. Please try connecting again.
 

It turned out my certificate had expired, I found this out through another fix where you clear preferences.xml. After deleting that file and trying to connect, it pops up with the certificate and I saw it had just expired. While the certificate auto renews through GoDaddy, it doesn't on the ASA. I didn't update the certificate, we have a network guy that does that and he doesn't tell me how he does stuff.
I know he generated a CSR that I had to paste into GoDaddy. GoDaddy verified and issued the cert, and I downloaded the Apache version of the cert from GoDaddy.

Friday, September 15, 2017

something went wrong and outlook couldn’t set up your account. please try again. if the problem continues, contact your email administrator.

I got this error on a new install of Windows 10. I was also getting kb2566790 DNS errors with skype.
After going through some internet fixes (disabling IPv6, full reset of 10) to no avail, I was thinking it might just be the version of W10. A new 'nothing works' update or something.

After some trial and error, I tried adding the account under the local admin account. Worked fine. Added this specific user as a local admin and Skype no longer had the issue, and I was able to add the email account.

This particular user is part of a domain I don't manage within the same corporate umbrella. I'm guessing they have some dumb group policy or something. I didn't care to look, I just needed to get this user running.

Wednesday, September 13, 2017

Resyncing previously synced account in Office 365 and synching a new account to an existing

If you read my previous article about my migration fiasco, you'll remember I pointed out that previously synced accounts are fubar'd and won't sync.
After some discussion with Microsoft, I was informed there is a source anchor/immutable ID that populates in synced accounts. This ties the account to the local On Premise AD account and won't let anything else connect.
In my case, the old "On Premise AD" was a cloud Okta server that we didn't have anymore. Luckily, these accounts transitioned to In Cloud (I don't remember if they went into a Soft Delete, but they probably did.)
The first tech I spoke with a while back gave me some pretty... scary solutions.
Option A would be to disable Azure sync for 3 DAYS and run a bunch of powershells.
Option B would be to delete the account in question, sync an account from the local ad and reattach the mailbox via powershell. Rendering all shares to this account useless. FUUUUUUAAAA.

Well, one of the accounts was my own and I Option B'd that muthafuka. 0/10 would not recommend.

This whole time I was like, can't we just get rid of that immutable ID? clear the flag? The MS guy said the only way would be to disable the Azure Sync for 24-36 hours...

Fast forward, and I found out this is not the case.
Once the account is in In Cloud status, you just have to run a simple powershell on the account.
You will have to do this through the Azure AD module for powershell  http://connect.microsoft.com/site1164/Downloads/DownloadDetails.aspx?DownloadID=59185
And good luck with that. I have fully updated Windows 10 and it keeps saying I need Powershell 2.0 or higher... (if you have fixed this stupid error, please let me know, I gave up and set it up on my DC)

  • Run the command "Connect-MsolService". (Enter Global Admin credentials when prompted).
  • Check the details of a user with the below command:
  • Get-MsolUser -UserPrincipalName user@domain.com | FL
  • To remove the Immutable ID, run below command:
  • Set-MsolUser -UserPrincipalName user@domain.com -Immutableid ""
  • The above command will remove the Immutable ID for the user


At this point the account is ready to be synced with a new AD account on any local AD anywhere.

Unable to convert O365 mailbox to shared mailbox

Converting a mailbox to a shared mailbox is normally pretty easy in Office 365.
Log into the Admin center, Users, locate the user, expand Mail Settings (you will see this if the user has proper licensing and you have proper admin level) and click on the Convert to shared Mailbox option


Easy Peasy.
So you're running O365 and you're thinking 'Boy, it would be nice to have at least the same password between my local AD and Office 365.'
So you do that, pretty simple.
But wait, what's this? A user left and now you need to convert them to a shared mailbox so everyone can view their email and pretend to be them. (insert your own personal reason for making a user mailbox shared)
You follow the same steps as before, but the option isn't there.

Darn!
This is because the account is now Synced with a local active directory.
Donezo, right? I guess its time to give all the users full access rights on this mailbox... But wait, there's more!
If you move the terminated user, or whatever the reason, to a NON syncing OU, the account will soft delete.
I know DELETE is scary, but this is a soft scary. Think lion or koala, just kidding, its not that bad.
Now that the account is no longer an active user, it will show up in Deleted Users in Admin

Find the user here, and Restore the user, you can set a password or let it do a random password, doesn't really matter.
Once that is done, the account will now be "In Cloud" and you can convert it to a shared mailbox.

Tuesday, July 25, 2017

Sync local AD to office 365 In Cloud accounts

Environment:
In Cloud accounts for all local accounts.
Existing Exchange server
O365 tenant operating as EOP
AD and O365 tenant are different names (localcompany.com, cloudcompany.com)
Azure AD Connect on another domain (DNS entries so the servers can see eachother)

"cloudcompany.com" was added as a DNS suffix to localcompany.com AD

LogonName:
In AD Users and Computers, Account tab, User Logon Name.
In the drop down there will be an option for the O365 domain. In my case, the naming convention also changed from first initial last name to firstname.lastname. I changed the User Logon Name to match what was in Office 365, first.last@cloudcompany.com

Change Display name to match:
Another convention that changed was First Last on the local AD to Last, First in the cloud. I changed the Display Name to match what is going to be in Office 365.
NOTE:
All address fields and information in the local AD will overwrite anything you already have in Office 365, so make sure the local AD is clean and has the information you want in Office 365.

created a connection rule to forward all localcompany.com email to our local server, this was in addition to the regular connection rule.

Matched Primary SMTP of local account to Cloud account.
(this is what MS says to do, doing this fucks up the connection rule forward, adding the primary cloud SMTP as an alias is all you need.)


Went through the Azure AD connect Wizard to select the OUs that had the users I wanted to sync.

Previously synched office 365 accounts, like with OKTA for example, are fubared and won't sync.(fixed later) These accounts threw errors:
This object has been updated in your Azure Active Directory, but with some modified properties, because the following attributes are associated with another object [UserPrincipalName


Also, I ended up needing the Host domain as the primary SMTP in the cloud to add to Outlook using the O365 connector in Outlook. I had originally planned to have both internal and O365 accounts in the outlook client, but the matching names messed everything up. Then I thought I'd create a new account for access to public folders, this also didn't work. It worked for the first few people, but as it scaled out it became unusable. This may be due to session limitations on individual users.


All synced users were hidden from the O365 GAL... msExchHideFromAddressLists was null, changed to False and they started showing up. This change took 24hours to complete.

Fuck this shit, never again. This migration almost made me quit.


Tips:
DO NOT do a staged migration this way. If you are going to migrate from an On Prem to the cloud, do it like a bandaid, fast and on 2. (1...2...pull...3)

Friday, July 14, 2017

Rebuilding or reconnecting Outlook autocomplete cache

either in exchange 2013+ or Office 365.

If you created a new outlook profile, I'm sure you've had complaints about 'contacts' missing. AKA the autocomplete cache.
This used to be stored in the NK2 file, stored in user\AppData\Roaming\Microsoft\Outlook\ rename as the current profile and you're done.
Microsoft holds this data on the server now, which is nice, BUT, what if you just migrated to Office365 like you have to? Because Microsoft is mother, Microsoft is father. Yes master Microsoft, I will do whatever you say. I don't need servers anymore, all must be cloud. Thank you.

Users\user\AppData\Local\Microsoft\Outlook\RoamCache\ holds a .dat file of your autocomplete
Its a super cool file name Stream_Autocomplete_absolutejibberish. It really makes it easy to find out what the new one is and what the old one was... Not.
Its easy enough to figure out which is the new autocomplete dat though, the one that's a KB and was made today, that's the new one. The old one is easy to find too. The one that wasn't made today, and has a lot of KB.

Close outlook, copy the old dat to a different folder (incase this all goes south and you have to try again, which I talk about below)
You'll want to change the old .dat filename to the new .datfile name. The file with the KBs will have the new file name. I hope that's clear... I'm reading it now and its not.
Copy the file name of the new dat, and delete new dat file. Den copy da new dat name to da old dat file and save dat shit.
Open outlook and take a look, all dat autocomplete is back.


Weird shit:
So I would do these steps, copy the new name, delete the new file, copy the new name to the old file, open outlook and watch as the Autocomplete file shrunk from 1000kb to 60kb... remember that step I said about copying the old autocomplete to a new file? Bet you wish you did that now, don't you. Close outlook, rename again and it should work. No idea why this is happening, but I seem to have to do the process twice.
Close outlook, rename, open outlook, close outlook, rename, done.

Wednesday, June 14, 2017

Xerox Workcentre 59xx scan to Office 365

 I went on to update the other office scanners, and these were easier.
They were able to authenticate with a mail enabled office 365 account to send.

(These directions assume your scanner is already setup on the network and can scan to your local email server)

Log into your Xerox
decent site https://default-password.info/xerox/
default for the 59xx:
admin
1111

Once you're in go to Properties
Email
SMTP

Under Server, you can select Use DNS to select SMTP server, and it will give you the option to update the DNS servers. I added google (8.8.8.8) as the third DNS, the other two being internal servers. I read that the scanner might not find smtp.office365.com without an external DNS, (I didn't test without the external, if it works with just internal DNS let me know.)

Ok, so back to email (link at the top of the DNS page.)
I selected Hostname and entered smtp.office365.com
Device Email address I used the mail enabled account at my domain.

Save

SMTP auth, I used system and put in the mail enabled account. (User@emaildomain.com)


Go to the Connection Encryption tab and select STARTTLS
I tried SSL/TLS and it never connected, STARTTLS and the test went right away.

Test your configuration.

Monday, June 12, 2017

Optiplex 3040 no boot devices found

I got a nice new Dell computer and shipped it out to a user. After a couple months
No boot devices found...
FML

So I had the user send it in to check it out. Data was on the drive. Swapped drive with a clean drive and loaded my windows 7 image to it.
It ran through the image, rebooted.

No boot devices found....
weird.

I took the drive out of my computer and put it in the 3040 case.

No boot devices found...

what the duck?

Put the drive back in my computer. Boots fine.

Double what the duck!

Talked with dell support and they sent me a new drive preloaded with one of their  images. Popped that badboy in, boots like a charm. Issue fixed yay!

So I reimage the drive with the corporate image...

No boot devices found.
Time to throw it in the trash...

But there's more!

After farting around with it for a couple months, and the Dell tech going no contact, I finally figured it out.
I set BIOS boot setting to legacy instead of UEFI.

Imaged drive loads! Yay.

Option 3: Configure a connector to send mail using Office 365 SMTP relay

Creating the "Option 3" connector for multi function printer scanners to scan to email using Office 365. I am using a Ricoh Aficio MP2852

The SMTP server is your MX endpoint (domain-com.mail.protection.outlook.com)
Port 25
TLS enabled

Administrator email I used a mail enabled account.

Add a Mail Flow connector.
Name it what it does and give a description.
Example:
Office Scanner.
Makes it so the scanner can scan to Office 365.

Select "By verifying that the IP address of the sending server matches one of the IP addresses that belong to your organization"
Hit the Plus and put in your local IP (google/bing "what is my IP")

This was getting the mail to Office 365, but it was failing SPF, if you're not checking SPF (you madman) you won't have this issue.

If you are, the next step made it work:
Exchange admin center
Protection
Connection Filter
Add local IP (google/bing "what is my IP") to Allowed IP Address

Disabling Azure AD connect

Disconnected and uninstalled Azure Active Directory Connect from the AD server, but still getting unhealthy synchronizations?
Log into portal.office.com, at the bottom, go to Admin centers, Azure AD
double click on your domain
Directory integration tab and deactivate

Wednesday, April 19, 2017

Recovery partition blocking extend volume option

Environment: Windows 10

Situation: I had a 1000mb Recovery Partition that was separating the C drive from the unallocated space.

How I got here: I used windows backup and recover to copy a user's machine from a 250gb HD to a 500gb HD. Some users need to keep everything apparently...

Solution:
1.Right click the start icon and select the Command prompt(Admin).
2.Type Diskpart in the command prompt - Enter.
3. Type rescan at the prompt. - enter - This operation will take a few seconds.
4. Type list disk and press Enter
5.Select the disk, where the partition is sitting - in your case, probably 0, by typing Select disk 0
6. Type list partitions and enter.
7.Carefully select the partition that you wish to delete, by typing select partition x (substitute x)
8. Type delete partition override and enter.

Thanks to this forum post:
https://www.windows10forums.com/threads/recovery-partition-getting-in-the-way-of-extending-c-partition.7777/

Getting RTL8812au passed to Virtualbox VM (Ubuntu)

There are no guarantees, I just write these notes so I can come back to them. First, get the dongle working on the host OS. After going thro...