【問題】freebsd的系統管理



贊助商連結


SDES
2002-03-07, 11:31 AM
各位網友大家好
想跟大家請教5個問題
如果在敘述的過程中不詳盡,還煩請網友提醒
第一個問題:在已建立sendmai的freebsd中,先前為同事建立的郵件帳號如果不要再用了,是否有什麼指令可以一併移除帳號及郵件?因為目前我是先rm ***(***帳號),再到/mail的目錄下面去刪除郵件
第二個問題:在/mail的目錄中,會發現一個類似對應帳號的檔案 .***(帳號).pop ,想請問各位網友這個檔案的功用是什麼?
第三個問題:在freebsd中,想要更改帳號的登入目錄,我下的指令為usermod,卻沒有作用,是指令出錯?還是有需要再注意的地方,而我忽略了?
第四個問題:在ls的指令參數中,是否有類似ms-dos的dir/p的指令?可以先顯示部分的檔案資料,而不是一次就直接顯示到最後的檔案資料?
第五個問題:在root的mail下已經累積了近千封的郵件,不知道是否可以刪除?因為主要考量對象為root,因為看過信件內容,似乎是對於系統的修改過後,如新增帳號,便會有一個mail進入,自己沒有能力判斷其重要性?
以上問題繁雜
如您願意回覆任何一個問題,解決我目前的疑惑,在此都先跟您說聲謝謝

贊助商連結


repsol
2002-03-08, 01:50 AM
1. 可以用rmuser


RMUSER(8) FreeBSD System Manager's Manual RMUSER(8)

NAME
rmuser - removes users from the system

SYNOPSIS
rmuser [-y] [username]

DESCRIPTION
The utility rmuser

1. Removes the user's crontab(1) entry (if any).

2. Removes any at(1) jobs belonging to the user.

3. Sends a SIGKILL signal to all processes owned by the user.

4. Removes the user from the system's local password file.

5. Removes the user's home directory (if it is owned by the user),
including handling of symbolic links in the path to the actual home
directory.

6. Removes the incoming mail and pop daemon mail files belonging to the
user from /var/mail.

7. Removes all files owned by the user from /tmp, /var/tmp, and
/var/tmp/vi.recover.

8. Removes the username from all groups to which it belongs in
/etc/group. (If a group becomes empty and the group name is the
same as the username, the group is removed; this complements
adduser(8)'s per-user unique groups).


2. 可以說是pop3的spool...

當client端透過pop3收信的時候...ID和passwd通過認證...pop3就會把/var/mail/個人ID信件的file都丟給 .user.pop

當client收玩信...

/var/mail/個人id
/var/mail/.個人id.pop


這兩個file都會規零


3. su 成 root , 用 chsh來修改


ex : chsh 你要變動的id ,改完存檔 (vi)



4. ls |more

5. 如果覺得沒用就砍
FreeBSD會有例行的檢查系統工作..
這些report都會寄給root


這些如果你覺得沒用..就檢查一下root的crontab

詳情可以
man periodic


你不要的檢查工作就comment起來即可

SDES
2002-03-08, 06:02 PM
謝謝版主的答覆
我會試試看的
謝謝您,謝謝