基础教程

    在使用Linux系统中,有时候还需要做身份切换,这是为什么?

Windows 10 IoT Core简介

Windows 10 IoT是微软专门为物联网生态打造的操作系统,Windows 10 IoT Core则是Windows 10 IoT 操作系统的核心版本,功能相对精简。使用Windows 10 IoT可以打造属于自己的物联网生态系统。

复制以下代码并录制宏,运行一次即可。

  • 使用普通账号:系统日常操作的好习惯
      虽然使用root对系统进行各种操作不受权限等方面的限制,但却存在重大的安全隐患,假如有人不小心输入的命令 rm -rf /。因此为了安全,一般都建议尽量以普通用户身份来进行系统日常操作,而在需要用户超级权限来管理和配置系统时才需要切换到 root用户。
  • 用较低权限启动系统服务
      相对于系统安全,我们必须要以某些系统账号执行某些程序。如MySQL,我们则可以新建一个mysql账号来专门执行MySQL服务或程序。这样可以最大限度的保证系统安全。
  • 系统安全策略限制
      为了系统安全,禁止远程以root账户登录系统是基本的安全策略手段

Windows 10 IoT的版本介绍

  • Windows 10 IoT 企业版

Windows 10 IoT 企业版将 Windows 10 企业版功能广泛应用于零售、制造、医疗、金融和其他行业的设备上。Windows 10 IoT 企业版设备运行功能强大的业务线应用并以安全、可靠且简化的方式执行专用功能,以支持关键任务型行业设备。

Windows 10 IoT 企业版同时支持通用 Windows 应用和经典 Windows 应用,还提供很多创新性功能:针对现代安全威胁的高级保护,充分的部署灵活性、更新选项和支持选项,以及全面的基础结构、设备和应用管理功能。对于需要可管理性、一致性和可预测性的公司,请选择 Windows 10 IoT 企业版和 Windows 10 企业版。

  • Windows 10 IoT 移动企业版

Windows 10 IoT 移动企业版为需要自然的用户体验以及企业级安全和可管理性的业务线移动设备提供 Windows 10 移动企业版的功能。它即时的应用访问、对条码扫描和其他外设的固有支持以及安全的设备体验可以在各种移动情形下提升工作效率。

移动企业版还提供很多其他功能,如多个用户配置文件和高级锁定,以支持零售、医疗保健、制造和其他垂直行业中的移动业务线情形。

  • Windows 10 IoT 核心版

Windows 10 IoT 核心版是针对较小的低成本行业设备进行了优化的 Windows 10 版本。这个版本专为支持 IoT 网关或微型自助服务终端等设备而构建,旨在运行单个业务线应用。Windows 10 IoT 核心版运行通用 Windows 应用并使用与其他 Windows 10 版本相同的开发、配置和管理工具,这使它可以轻松集成到 IoT 方案并利用现有资源。

Option Explicit

Public Sub AllInternalPasswords()

' Breaks worksheet and workbook structure passwords. Bob McCormick

' probably originator of base code algorithm modified for coverage

' of workbook structure / windows passwords and for multiple passwords

'

' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)

' Modified 2003-Apr-04 by JEM: All msgs to constants, and

' eliminate one Exit Sub (Version 1.1.1)

' Reveals hashed passwords NOT original passwords

Const DBLSPACE As String = vbNewLine & vbNewLine

Const AUTHORS As String = DBLSPACE & vbNewLine & _

"Adapted from Bob McCormick base code by" & _

"Norman Harker and JE McGimpsey"

Const HEADER As String = "AllInternalPasswords User Message"

Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"

Const REPBACK As String = DBLSPACE & "Please report failure " & _

"to the microsoft.public.excel.programming newsgroup."

Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _

"now be free of all password protection, so make sure you:" & _

DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _

DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _

DBLSPACE & "Also, remember that the password was " & _

"put there for a reason. Don't stuff up crucial formulas " & _

"or data." & DBLSPACE & "Access and use of some data " & _

"may be an offense. If in doubt, don't."

Const MSGNOPWORDS1 As String = "There were no passwords on " & _

"sheets, or workbook structure or windows." & AUTHORS & VERSION

Const MSGNOPWORDS2 As String = "There was no protection to " & _

"workbook structure or windows." & DBLSPACE & _

"Proceeding to unprotect sheets." & AUTHORS & VERSION

Const MSGTAKETIME As String = "After pressing OK button this " & _

"will take some time." & DBLSPACE & "Amount of time " & _

"depends on how many different passwords, the " & _

"passwords, and your computer's specification." & DBLSPACE & _

"Just be patient! Make me a coffee!" & AUTHORS & VERSION

Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _

"Structure or Windows Password set." & DBLSPACE & _

"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _

"Note it down for potential future use in other workbooks by " & _

"the same person who set this password." & DBLSPACE & _

"Now to check and clear other passwords." & AUTHORS & VERSION

Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _

"password set." & DBLSPACE & "The password found was: " & _

DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _

"future use in other workbooks by same person who " & _

"set this password." & DBLSPACE & "Now to check and clear " & _

"other passwords." & AUTHORS & VERSION

Const MSGONLYONE As String = "Only structure / windows " & _

"protected with the password that was just found." & _

ALLCLEAR & AUTHORS & VERSION & REPBACK

Dim w1 As Worksheet, w2 As Worksheet

Dim i As Integer, j As Integer, k As Integer, l As Integer

Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer

Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer

Dim PWord1 As String

Dim ShTag As Boolean, WinTag As Boolean

Application.ScreenUpdating = False

With ActiveWorkbook

WinTag = .ProtectStructure Or .ProtectWindows

End With

ShTag = False

For Each w1 In Worksheets

ShTag = ShTag Or w1.ProtectContents

Next w1

If Not ShTag And Not WinTag Then

MsgBox MSGNOPWORDS1, vbInformation, HEADER

Exit Sub

End If

MsgBox MSGTAKETIME, vbInformation, HEADER

If Not WinTag Then

MsgBox MSGNOPWORDS2, vbInformation, HEADER

Else

On Error Resume Next

Do 'dummy do loop

For i = 65 To 66: For j = 65 To 66: For k = 65 To 66

For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66

For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66

For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126

With ActiveWorkbook

.Unprotect Chr(i) & Chr(j) & Chr(k) & _

Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _

Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

If .ProtectStructure = False And _

.ProtectWindows = False Then

PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _

Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _

Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

MsgBox Application.Substitute(MSGPWORDFOUND1, _

"$$", PWord1), vbInformation, HEADER

Exit Do 'Bypass all for...nexts

End If

End With

Next: Next: Next: Next: Next: Next

Next: Next: Next: Next: Next: Next

Loop Until True

On Error GoTo 0

End If

If WinTag And Not ShTag Then

MsgBox MSGONLYONE, vbInformation, HEADER

Exit Sub

End If

On Error Resume Next

For Each w1 In Worksheets

'Attempt clearance with PWord1

w1.Unprotect PWord1

Next w1

On Error GoTo 0

ShTag = False

For Each w1 In Worksheets

'Checks for all clear ShTag triggered to 1 if not.

ShTag = ShTag Or w1.ProtectContents

Next w1

If ShTag Then

For Each w1 In Worksheets

With w1

If .ProtectContents Then

On Error Resume Next

Do 'Dummy do loop

For i = 65 To 66: For j = 65 To 66: For k = 65 To 66

For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66

For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66

For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126

.Unprotect Chr(i) & Chr(j) & Chr(k) & _

Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _

Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

If Not .ProtectContents Then

PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _

Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _

Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

MsgBox Application.Substitute(MSGPWORDFOUND2, _

"$$", PWord1), vbInformation, HEADER

'leverage finding Pword by trying on other sheets

For Each w2 In Worksheets

w2.Unprotect PWord1

Next w2

Exit Do 'Bypass all for...nexts

End If

Next: Next: Next: Next: Next: Next

Next: Next: Next: Next: Next: Next

Loop Until True

On Error GoTo 0

End If

End With

Next w1

End If

MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER

End Sub

    基于以上考虑,在日常应用中都是使用普通账户进行登录和常用操作。如果需要维护系统或安装、更新软件时,则需要切换到root身份进行操作。而常用的方式主要有两个:

Raspberry Pi 3B简介

Raspberry Pi 3B即第三代树莓派,主要配置为

  • 1G内存
  • 4核CPU 1.2GHz ARM Cortex-A53 64位 (ARMv8系列)
  • USB接口 *4
  • HDMI接口
  • RJ45网络接口
  • 3.5mm音频插孔
  • MicroSD卡插槽
  • 支持蓝牙
  • 支持WIFI

目前Raspberry Pi支持多种操作系统,常见的系统有以下几种,主要基于Linux与Windows平台:

  • NOOBS
  • RASPBIAN
  • UBUNTU MATE
  • SNAPPY UBUNTU CORE
  • WINDOWS 10 IOT CORE
  • OSMC
  • LIBREELEC
  • PINET
  • RISC OS
  • WEATHER STATION
  • ICHIGO JAM RPI

其中使用最频繁的操作系统应该属RASPBIAN莫属了,一个基于Debian的Linux操作系统,主流支持的操作系统,详情参见Raspberry Pi系统下载。

  • su:可以切换到指定的用户,如果切换到root,则需要知道root的密码
  • sudo:提前设置好sudo权限,执行以sudo 命令,则可以以root身份执行命令,相比于su而言,可以保证root密码不会泄漏。

材料准备

  • Raspberry Pi 3B

图片 1

  • USB数据线

图片 2

  • MicroSD储存卡

图片 3

  • 电源
  • 网线
  • MicroSD读卡器

本文由澳门新葡亰平台官网发布于操作系统,转载请注明出处:基础教程

TAG标签:
Ctrl+D 将本页面保存为书签,全面了解最新资讯,方便快捷。