亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: 如何讓一個(gè)用戶看不到其他用戶 [打印本頁]

作者: xlmeng1988    時(shí)間: 2016-06-14 16:35
標(biāo)題: 如何讓一個(gè)用戶看不到其他用戶
請問:如何新建一個(gè)用戶,該用戶不能看見其他用戶,即不能看見/home/下的其他用戶的目錄?
作者: action08    時(shí)間: 2016-06-14 16:35
本帖最后由 action08 于 2016-06-14 21:56 編輯

你的需求足夠挑剔,目前l(fā)inux默認(rèn)機(jī)制是不提供你的需求的,即使是號(hào)稱高強(qiáng)度的安全linux也沒有這樣的機(jī)制
linux默認(rèn)還提供一種多用戶機(jī)制,查看當(dāng)期計(jì)算機(jī)登錄的用戶
  1. shell@localhost:~$ w
  2. 21:54:22 up 34 min,  2 users,  load average: 3.32, 3.32, 2.98
  3. USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
  4. shell    tty7     :0               21:20   34:40   2:43   0.09s /bin/sh /etc/xd
  5. shell    pts/0    :0.0             21:54    2.00s  0.08s  0.01s w
  6. shell@localhost:~$ w
  7. 21:55:26 up 35 min,  3 users,  load average: 3.12, 3.25, 2.98
  8. USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
  9. shell    tty7     :0               21:20   35:44   2:47   0.09s /bin/sh /etc/xd
  10. shell    pts/0    :0.0             21:54    1.00s  0.09s  0.01s w
  11. root     tty3     -                21:55    6.00s  0.16s  0.09s -bash
  12. shell@localhost:~$
  13. shell@localhost:~$
復(fù)制代碼
而且這些還依賴很多條件,比如linux是否存在漏洞等等等。既然你提到了小學(xué)生,那么就應(yīng)該假設(shè)小學(xué)生不會(huì)擁有機(jī)器的root權(quán)限。


目前有一個(gè)比較穩(wěn)妥的辦法不知道你是否考慮,而且也很簡單,
裝個(gè)虛擬機(jī),專門給guest使用

作者: _bbb    時(shí)間: 2016-06-14 16:44
(1)把把其他用戶都放在一個(gè)groupA,并且設(shè)置 /home 只允許groupA訪問
(2)修改這個(gè)user1的 home directory,把user1從 groupA 排除在外

請問樓主,為什么會(huì)有這樣的要求?user1 能看到/home下面的目錄,但是進(jìn)不去就可以了
作者: jixuuse    時(shí)間: 2016-06-14 16:51
要?jiǎng)?chuàng)建一個(gè)超級后門用戶么?

最簡單的就是修改home目錄,丟到別人想不到的路徑下即可
作者: xlmeng1988    時(shí)間: 2016-06-14 17:09
回復(fù) 2# _bbb


1. 就是有這么個(gè)需求,想創(chuàng)建一個(gè)類似Guest的用戶,但是又不想讓他看見系統(tǒng)已有的用戶……
2. 如何設(shè)置/home只對個(gè)別組可見?好像還得設(shè)置別的才能完全不可見其他用戶吧。。。。

作者: xlmeng1988    時(shí)間: 2016-06-14 17:10
回復(fù) 3# jixuuse


    有人就是有這樣的需求…………
作者: jixuuse    時(shí)間: 2016-06-14 17:16
xlmeng1988 發(fā)表于 2016-06-14 17:10
回復(fù) 3# jixuuse



其實(shí),大隱隱于市

創(chuàng)建一個(gè)普通用戶,然后加入sudo,給ALL權(quán)限,這樣和root有何區(qū)別?別人還看不出來
作者: xlmeng1988    時(shí)間: 2016-06-14 18:12
jixuuse 發(fā)表于 2016-06-14 17:16
其實(shí),大隱隱于市

創(chuàng)建一個(gè)普通用戶,然后加入sudo,給ALL權(quán)限,這樣和root有何區(qū)別?別人還看不出 ...


跑偏了,我不是要弄一個(gè)超級后門。
打個(gè)比方,是給一個(gè)小學(xué)生留個(gè)門讓他進(jìn)來吃頓飯,但有不想讓他知道這個(gè)屋(home)里都有哪些人……
作者: action08    時(shí)間: 2016-06-14 22:06
本帖最后由 action08 于 2016-06-14 22:07 編輯

回復(fù) 3# jixuuse
  1. debian > man useradd
復(fù)制代碼
useradd -D [options]

DESCRIPTION
       useradd is a low level utility for adding users. On Debian,
       administrators should usually use adduser( instead.

       When invoked without the -D option, the useradd command creates a new
       user account using the values specified on the command line plus the
       default values from the system. Depending on command line options, the
       useradd command will update system files and may also create the new
       user's home directory and copy initial files.

       By default, a group will also be created for the new user (see -g, -N,
       -U, and USERGROUPS_ENAB).

OPTIONS
       The options which apply to the useradd command are:

       -b, --base-dir BASE_DIR
           The default base directory for the system if -d HOME_DIR is not
           specified.  BASE_DIR is concatenated with the account name to
...................
作者: xlmeng1988    時(shí)間: 2016-06-15 11:09
回復(fù) 8# action08

非常感謝!!
目前能想到的也就是裝個(gè)虛擬機(jī)創(chuàng)建Guest用戶了。


   
作者: 我不哭想    時(shí)間: 2016-06-15 21:50
看看了。。。。。。。。。。。




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2