Kali on RPI記錄(1)- 轉接, 無線網卡, 自動登入, SSH

不知道改什麼?

到/usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
[D-BUS Service]
Name=fi.epitest.hostap.WPASupplicant
Exec=/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log
User=root
SystemdService=wpa_supplicant.service
改成
[D-BUS Service]
Name=fi.epitest.hostap.WPASupplicant
Exec=/sbin/wpa_supplicant -u -onl80211 -O/var/run/wpa_supplicant

User=root


1. HDMI to VGA轉接頭 輸出到螢幕
=> 記憶卡內新增 config.txt 檔
:
hdmi_force_hotplug=1    #強迫以HDMI輸出
#hdmi_drive=2
#hdmi_group=2
#hdmi_mode=16


因為Raspberry Pi的視訊輸出有Composite RCA(AV端子、又稱複合端子,通常是黃色的RCA端子)與HDMI,兩者不能同時使用。當開機時,系統預設從AV端子輸出,但若偵測到有接HDMI,便會從HDMI輸出。若使用轉接頭或轉接線,Raspberry Pi便可能無法正常偵測,於是仍從AV端子輸出視訊,導致根本沒畫面。

參考:1.葉難 http://yehnan.blogspot.tw/2013/10/raspberry-pi.html
2. 雄:http://gsyan888.blogspot.tw/2013/06/raspberrypi-hdmi-to-vga.html

3. https://www.youtube.com/watch?v=1CiZVk8oJUA



2. 無線網卡上網設定
=> 改 /etc/wpa_supplicant/wpa_supplicant.conf
:
network={
ssid=”RS”             #看WIFI叫什麼名字
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=”12345678″   #WIFI密碼
}

=> 改  /etc/network/interfaces
:  (DHCP版)
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
  (固定IP版)


auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0



iface wlan0 inet static
        address 192.168.2.100 #要改
        netmask 255.255.255.0
       gateway 192.168.2.254

參考:1. 樹莓派:https://www.raspberrypi.com.tw/2152/setting-up-wifi-with-the-command-line/
2. 雄:http://gsyan888.blogspot.tw/2013/04/raspberry-pi-wireless-network.html
3. 自動登入 (未成功)
=> 改 /etc/inittab
:

#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
T0:23:respawn:/bin/login -f pi ttyAMA0 </dev/ttyAMA0 >/dev/ttyAMA0 2>&1

=>改 /etc/gdm3/daemon.conf.
:
[daemon]# Enabling automatic login
AutomaticLoginEnable = true
AutomaticLogin = root
=>改 /etc/kde4/kdm/kdmrc
:
[X-:0-Core]
AllowRootLogin=true
AutoLoginAgain=true
AutoLoginDelay=0
AutoLoginEnable=true
AutoLoginLocked=false
AutoLoginUser=root
ClientLogFile=.xsession-errors

=> 重新啟動網路設定
: /etc/init.d/networking restart


參考:1. 夢想不該只是夢想 http://inpega.blogspot.tw/2015/04/blog-post_17.html
2. http://www.blackmoreops.com/2013/12/19/auto-login-root-user-system-start-kali-linux-gnome-kde/



4. SSH(未成功)
=> 改/etc/ssh/sshd_config
#PermitRootLogin without-password
PermitRootLogin yes

=> 改/etc/motd -> 可改登入時顯示的字串 (可加入banner)

=> 重新啟動ssh
: service ssh restart

參考:1.Chaos:Enable SSH on kali: http://www.drchaos.com/enable-ssh-on-kali-linux/
2. banner製造機: http://patorjk.com/software/taag

作者

RongSon

Graduate Student of CCU COMM Game Development, Network Communication, macOS/Ubuntu/Android, Arduino/Raspberry Pi/Intel Edison, Java/Python/C/C++

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *