浏览代码

No sudoers

Bob Mottram 11 年前
父节点
当前提交
2257761ab6
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5
    5
      beaglebone.txt

+ 5
- 5
beaglebone.txt 查看文件

229
 su
229
 su
230
 #+END_SRC
230
 #+END_SRC
231
 
231
 
232
-Then make a new user.
232
+Then make a new user.  It's a bad idea to add users to the sudo group, because that then means that an attacker potentially only needs to know one password in order to get administrator access to the system.  With no sudoers an attacker needs to know, or be able to obtain, two separate passwords to be able to really compromise the system.
233
 
233
 
234
 #+BEGIN_SRC: bash
234
 #+BEGIN_SRC: bash
235
 adduser /username/
235
 adduser /username/
236
-adduser /username/ sudo
237
 #+END_SRC
236
 #+END_SRC
238
 
237
 
239
 Exit from the ssh login by typing "exit" a couple of times, then ssh back in as the new user.  Make sure you use a difficult to guess password/phrase, or ideally a randomly generated password used together with a password manager such as KeepassX.
238
 Exit from the ssh login by typing "exit" a couple of times, then ssh back in as the new user.  Make sure you use a difficult to guess password/phrase, or ideally a randomly generated password used together with a password manager such as KeepassX.
803
 Save and exit.
802
 Save and exit.
804
 
803
 
805
 #+BEGIN_SRC: bash
804
 #+BEGIN_SRC: bash
806
-sudo emacs /etc/Muttrc
805
+su
806
+emacs /etc/Muttrc
807
 #+END_SRC
807
 #+END_SRC
808
 
808
 
809
 Append the following:
809
 Append the following:
1555
 1- First we OpenSSL package for ssl certificate
1555
 1- First we OpenSSL package for ssl certificate
1556
 
1556
 
1557
 #+BEGIN_SRC: bash
1557
 #+BEGIN_SRC: bash
1558
-sudo apt-get install openssl libssl-dev
1558
+apt-get install openssl libssl-dev
1559
 #+END_SRC
1559
 #+END_SRC
1560
 
1560
 
1561
 2- Second we need hybrid source to patch it:
1561
 2- Second we need hybrid source to patch it:
2340
 and use /kill -9 <pid>/ to kill all mysql processes.
2340
 and use /kill -9 <pid>/ to kill all mysql processes.
2341
 
2341
 
2342
 #+BEGIN_SRC: bash
2342
 #+BEGIN_SRC: bash
2343
-sudo apt-get remove --purge mysql\*
2343
+apt-get remove --purge mysql\*
2344
 apt-get clean
2344
 apt-get clean
2345
 updatedb
2345
 updatedb
2346
 #+END_SRC
2346
 #+END_SRC