ubuntu设置mentohust开机自动登录校园网

#ubuntu设置mentohust开机自动登录校园网

设置环境:

ubuntu14.04 64位

 

无法忍受校园网ubuntu锐捷客户端登录每次开机都要输一大串命令

 

step1

首先下载mentohust,链接http://code.google.com/p/mentohust/downloads/list (需要翻墙才能访问)

附上百度网盘64位ubuntu下载链接 http://pan.baidu.com/s/1gdtYMVx

附上mentohust教程 http://blog.csdn.net/cike110120/article/details/31795733

 

step2

用apt-get安装sysv-rc-conf来管理启动项

安装方式:

1
sudo apt-get install sysv-rc-conf

 

step3

在/etc/init.d目录下,使用root权限编写脚本:login.sh

脚本内容:

1
2
 #!/bin/bash
sudo mentohust "此处为你的root账户密码"

将脚本文件更改权限为守护进程:

1
chmod +x login.sh

 

step4

用sysv-rc-conf命令来设置守护进程的运行级别

命令为:

1
sysv-rc-conf login.sh on

 

step5

重启电脑

PS:这种方法可适用于很多用户自主设定的开机启动项