Ganky 发布的文章

在较新的 Ubuntu 版本(如 16.04 及以后)中,rc.local 文件默认不存在,因为这些系统使用 systemd 作为初始化系统,取代了传统的 SysVinit 机制。如果需要使用 rc.local 方法,可以按照以下步骤操作:

手动创建并配置 rc.local
创建 rc.local 文件

sudo nano /etc/rc.local

添加以下内容

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/path/to/your/script.sh &  # 添加你的脚本路径

exit 0

保存并退出编辑器,然后设置文件权限:

sudo chmod +x /etc/rc.local

创建并配置 systemd 服务

sudo nano /etc/systemd/system/rc-local.service

添加以下内容到服务文件

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target

启用并启动服务

sudo systemctl enable rc-local
sudo systemctl start rc-local.service

验证服务状态

sudo systemctl status rc-local.service

曾经登录过的网上邻居凭证保存了如何修改?

1.打开凭据管理器:
按 Win + R,输入 control.exe /name Microsoft.CredentialManager,回车。
2.修改或添加凭据:
在“Windows凭据”下,找到共享资源的条目。
点击“编辑”修改现有凭据,或点击“添加Windows凭据”输入新的共享资源地址、用户名和密码。
3.保存更改:
输入新凭据后,点击“确定”保存。

有一天突然发现自己的电脑不能匿名访问局域网的某台Samba共享设备,其他电脑和手机都能访问,唯独我的电脑不能访问那个设备。

解决方法:
1、按 Win + R 组合键,打开运行,并输入:gpedit.msc 命令,确定或回车,打开“本地组策略编辑器”
2、选择:“计算机配置”——“管理模板”——“网络”——“Lanman工作站”,双击打开“启用不安全的来宾登录”,选择“已启用”并点击“确定”

QQ20241202-151113.png

方法/步骤:
1、按 Win + R 组合键,打开运行,并输入:regedit 命令,确定或回车,可以快速打开注册表编辑器;
2、注册表编辑器窗口中,依次展开到:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
随后在右侧新建DWORD值(32位)
3、直接将新建DWORD值(32位),命名为“AllowInsecureGuestAuth”,然后双击打开(如果存在该数据则无需新建),随后将数值数据改为“1”并点击“确定”保存设置;

文章来源:怎么解决Win10无法访问局域网|解决Win10无法访问局域网方法介绍 | 果木鱼网址导航