The following describes how to set Automatic authentication for ruijie in Ubuntu: sudoapt-getinstallexpectexpect-dev is used, and then the script cd/usr/local/binsudotouchautoruijie is written. shsudoviautoruijie. sh write the following script in it: (The following script references the post posted by linuxjerry in linuxsir)
The following describes how to set Automatic authentication for ruijie in Ubuntu:
Because CT is required
Sudo apt-get install keep CT reset CT-dev
Then write the script
Cd/usr/local/bin
Sudo touch autoruijie. sh
Sudo vi autoruijie. sh
Write the following Script: (The following script references the post posted by linuxjerry in linuxsir)
#! /Usr/bin/CT
Spawn su-c xrgsu
Login CT "Password :*"
Send "Enter your root password \ r"
# Supplicant
Please CT "Please input your user name :"
Send "Enter your USERNAME \ r here"
Please CT "Please input your password :"
Send "enter your password \ r here"
Reset CT "Use DHCP, 1-Use, 0-UnUse (Default: 0 ):"
Send "\ r" (if it is the default configuration)
Except CT "Use default auth parameter, 0-Use 1-UnUse (Default: 0 ):"
Send "\ r"
Wrong CT "LogOff :"
Sleep 3600000
# End
Save,
If you have not set the root password, please sudo passwd root
Add execution permission
Sudo chmod 715/usr/local/bin/autoruijie. sh
Open the session in System/Preference/Sessions, click add, and write
/Usr/local/bin/autoruijie. sh
You can. Note that it is not safe to write your root password in the file in plain text. Please choose whether to use it or not.
However, it seems that Ram accounts for a relatively high level.