الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

showmount

Show the exports of an NFS server (and which clients mounted them).

المستوى
امتحان RHCSA
المجموعة
الأقراص وأنظمة الملفات
يحتاج root
لا
الحزمة
nfs-utils

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

ماذا يفعل

showmount -e SERVER asks the server's mountd for its export list: the folders and who may mount them. It uses the NFSv3 mount protocol, so the server firewall must allow mountd and rpc-bind. With pure NFSv4 you can instead mount the server root (mount server:/ /mnt) and look.

طريقة الكتابة

showmount [OPTION]... [HOST]

الخيارات 6

الأكثر استخدامًا

-e, --exports
Show the export list.
-a, --all
Show client host and mounted folder pairs.
-d, --directories
Show only the folders mounted by clients.
--no-headers
No header line.
-h, --help
Show help.
-v, --version
Show the version.

أمثلة 10

$ مستخدم عادي# بصلاحية root (أو مع sudo)

  1. 1List the exports of a server

    showmount -e server2
    Export list for server2:
    /exports/home 192.168.122.0/24
    /exports/data 192.168.122.0/24

    Folder and allowed clients.

  2. 2Local server

    showmount -e localhost

    Check your own exports.

  3. 3Firewall blocks it

    showmount -e server2
    clnt_create: RPC: Unable to receive

    Open mountd and rpc-bind on the server: firewall-cmd --add-service={mountd,rpc-bind} --permanent.

  4. 4Without showmount (NFSv4)

    mount server2:/ /mnt; ls /mnt

    The pseudo root shows the exports.

  5. 5Clients that mounted shares

    showmount -a

    On the server (NFSv3 information only).

  6. 6Only folders

    showmount -d

    Folders in use.

  7. 7For a script

    showmount -e --no-headers server2 | awk '{print $1}'

    Only the paths.

  8. 8Check before an fstab entry

    showmount -e server2 | grep -w /exports/data

    The path must match exactly.

  9. 9Find open NFS exports in your network (security)

    for h in server1 server2; do showmount -e $h 2>/dev/null; done

    Exports to * (everyone) are a data leak risk.

  10. 10Check allowed client networks

    showmount -e server2 | grep '\*'

    Exports for any host.

رموز الخروج

0 :: Done. 1 :: Error.

الدليل الكامل

هذه الصفحة تشرح الأمر بكلمات بسيطة. الدليل الأصلي فيه كل التفاصيل.

في الطرفية: man 8 showmount