nat123 linux版开机自动登录启动示例

操作系统 强烈建议 2024-02-07 14:55 159 0

  本文为您介绍一下nat123 linux版开机自动登录启动示例

  Linux版一般登录使用命令:

  #cd /soft/nat123 –进入自己本地实际安装目录

  #screen -S nat123 –创建一个单独的客户端进程运行,不影响其他应用并行运行

  #mono nat123linux.sh —执行命令目录下会自动生成一些配置文件,故需要上一个cd命令,确保配置文件生成在安装目录下

  按照提示依次输入自己的正确的帐号和密码即可成功登录。

  开机自动读本地最近登录帐号启动(推荐):

  (1)本地先手动输入帐号密码成功登录一次;客户端会自动记住正确的登录帐号密码。

  (2)再次登录时即无需重复输入帐号密码,通过#mono nat123linux.sh service即可登录使用。可将此命令写入自己的开机启动脚本即可实现开机自动登录使用。例如:

  #cd /soft/nat123 –进入本地实际安装目录

  #screen -S nat123 –创建一个单独的客户端进程运行,不影响其他应用并行运行

  #mono nat123linux.sh –第一次使用时,依次输入正常的帐号密码并成功登录

  下次登录时,即无需再输入帐号密码:

  #cd /soft/nat123 –进入本地实际安装目录

  #screen -S nat123 –创建一个单独的客户端进程运行,不影响其他应用并行运行

  #mono nat123linux.sh service –读取本地上一次成功登录帐号启动。

  带帐号Linux机下的用户登录:

  支持#mono nat123linux.sh autologin username password 带帐号密码一令登录,其中username是自己的用户名,password是自己的密码。可通过此登录方式自定义shell脚本和类似调用实现开机自动登录启动。例如:

  #cd /soft/nat123 –进入自己本地实际安装目录

  #screen -S nat123 –创建一个单独的客户端进程运行,不影响其他应用并行运行

  #mono nat123linux.sh autologin username password –带帐号密码登录

  提示,此方式下如开机时未能及时联网成功,可能会导致客户端登录失败。

  开机自动登录启动(centos参考一/推荐):

  把启动程序的命令添加到/etc/rc.d/rc.local文件中,如下。

  #!/bin/sh

  # This script will be executed *after* all the other init scripts.

  # You can put your own initialization stuff in here if you don’t

  # want to do the full Sys V style init stuff.

  touch /var/lock/subsys/local

  cd /soft/nat123 –本地实际安装目录

  screen -S nat123 –创建一个单独的客户端进程运行,不影响其他应用并行运行

  mono nat123linux.sh service –此命令方式支持断网自动重连,推荐启动方式

  提示1:本地必须先手动输入帐号密码成功登录一次。

  提示2:注意/etc/rc.d/rc.local文件需要chmod +x权限。

  开机自动登录启动(centos参考二):

  把启动程序的命令添加到/etc/rc.d/rc.local文件中,如下。

  #!/bin/sh

  # This script will be executed *after* all the other init scripts.

  # You can put your own initialization stuff in here if you don’t

  # want to do the full Sys V style init stuff.

  touch /var/lock/subsys/local

  cd /soft/nat123/

  screen -S nat123 –创建一个单独的客户端进程运行,不影响其他应用并行运行

  mono nat123linux.sh autologin username password

  在如上代码中,实际路径和自己的帐号密码换为自己的即可。

  提示:注意/etc/rc.d/rc.local文件需要chmod +x权限。

  开机自动登录启动(ubuntu参考一/推荐):

  把启动程序的命令添加到/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.

  cd /soft/nat123 –本地实际安装目录

  screen -S nat123 –创建一个单独的客户端进程运行,不影响其他应用并行运行

  mono nat123linux.sh service

  exit 0

  提示1:本地必须需要先手动输入帐号密码成功登录一次。

  提示2:注意/etc/rc.d/rc.local文件需要chmod +x权限。

  开机自动登录启动(ubuntu参考二):

  把启动程序的命令添加到/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.

  cd /soft/nat123

  screen -S nat123

  mono nat123linux.sh autologin username password

  exit 0

  在如上代码中,实际路径和自己的帐号密码换为自己的即可。

  提示:注意/etc/rc.d/rc.local文件需要chmod +x权限。

  其他linux开机自动登录启动参考:

  参考如上centos/ubuntu方法,如不知rc.local路径,可以find / -name rc.loacl查看。文件路径和帐号密码以自己实际为准。有图形界面的同样可以通过界面添加开机自启动。

  提示:

  1,推荐使用mono nat123linux.sh service自动登录方式,此命令支持断网自动重连。

  2,带帐号mono nat123linux.sh autologin username password方式时,如开机时未及时联网成功,可能会导致登录失败。



时间:(2024-02-07 14:55:23)
本站资源均来自互联网或会员发布,如果不小心侵犯了您的权益请与我们联系。我们将立即删除!谢谢!