Linux 小問題&小技巧

來源:互聯網
上載者:User

001:建立Administrator 群組內一般使用者(CentOS):
  在一般情況下,一般使用者通過執行 "su - " 命令,再輸入正確root密碼就可登入root案頭,現建功立業一個管理員的組,只允許這個組的使用者執行 " su - "命令,其他使用者即使密碼正確也無法進入,在unix下,這個組通常為 " wheel ":(以下為操作步驟)
 [ ]# usermod -G wheel cody
   [ ]# vi /etc/pam.d/su
   # auth required /lib/securrity/$ISA/pam_wheel.so use_uid   (找到此行,去掉行首的"#")
   [ ]#echo "SU_WHEEL_ONLY yes" >> /etc/login.defs     /*添加語句到行末*/

 002:RHEL4關閉SELINUX方法(APACHE不能訪問到/var/www/thml/以外的目錄問題):
   修改/etc/selinux/config檔案中的SELINUX=" "設為disabled (再重啟).

003:添加使用者時出現以下資訊:"useradd:unable to lock passwd file ; useradd:cannot lock shadow passwd file "之類的資訊的處理辦法:刪除/etc/下所有帶.lock的檔案,即 #cd /etc/   ;  #rm *.lock

004:雙系統重新安裝windows系統後,原來的linux系統不見了的處理辦法:用linux第一張光碟片引導進入linux resue模式,執行以下兩條命令:
  #chroot /mnt/sysimage       /*改變你的目錄*/
  #grub-install /dev/hda       /*安裝grub到MBR裡去*/

005:在linux下的中文顯示為?號的處理方法:
           修改/etc/fstab檔案
       /dev/hda1 /mnt/c vfat default 0 0改為
      /dev/hda1 /mnt/c vfat iocharset=cp936 0 0即可

006:You don't have permission to access / on this server.
 如果出現上述提示,請修改httpd.conf配置,如下,去掉紅色部分!!
  < Directory / >
  Options FollowSymLinks
  AllowOverride None
  Order deny,allow
  Deny from all
  < /Directory >

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.