Untata amfani da kayan USB a cikin Linux

Waɗanda ke aiki tare da masu amfani a cikin cibiyoyin da ke buƙatar wasu ƙuntatawa, ko dai don tabbatar da matakin tsaro, ko ta wata dabara ko oda "daga sama" (kamar yadda muke faɗi a nan), sau da yawa suna buƙatar aiwatar da wasu ƙuntatattun hanyoyin isa ga kwamfutoci, a nan ni zaiyi magana musamman game da ƙuntatawa ko sarrafa damar zuwa na'urorin ajiyar USB.

Untata USB ta amfani da kayan aiki na zamani (bai yi mini aiki ba)

Wannan ba ainihin sabon aiki bane, ya ƙunshi ƙara rukunin usb_storage a cikin jerin sunayen ƙananan kernel da aka ɗora, zai zama:

amsa kuwwa usb_storage> $ HOME / blacklist sudo mv $ HOME / blacklist /etc/modprobe.d/

Sannan zamu sake kunna kwamfutar kuma hakane.

Bayyana cewa kodayake kowa ya ba da wannan madadin azaman mafi inganci, a cikin Arch ɗin na bai yi min aiki ba

Kashe USB ta cire direban kwaya (bai yi min aiki ba)

Wani zaɓi shine cire USB direba daga kernel, saboda wannan muna aiwatar da umarnin mai zuwa:

sudo mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb* /root/

Mun sake yi kuma mun shirya.

Wannan zai matsar da fayil din da ke dauke da direbobin USB da kernel ke amfani da su zuwa wani babban fayil (/ root /).

Idan kanaso ka warware wannan canjin to zai wadatar da:

sudo mv /root/usb* /lib/modules/$(uname -r)/kernel/drivers/usb/storage/

Ni ma wannan hanyar ba ta yi aiki a kaina ba, saboda wasu dalilai USBs din sun ci gaba da yi min aiki.

Rictuntata samun dama ga na'urorin USB ta hanyar canzawa / kafofin watsa labarai / izini (IDAN ya yi mini aiki)

Wannan ita ce hanyar da lalle ke aiki a gare ni. Kamar yadda yakamata ku sani, ana saka na'urorin USB akan / kafofin watsa labarai / o dist idan distro ɗinku yayi amfani da tsarin, an ɗora su akan / gudu / kafofin watsa labarai /

Abin da za mu yi shi ne canza izini zuwa / kafofin watsa labarai / (ko / gudu / kafofin watsa labarai /) don KADAI mai amfani tushen ya sami damar shiga abubuwan da ke ciki, saboda wannan zai wadatar:

sudo chmod 700 /media/

ko ... idan kuna amfani da Arch ko kowane distro tare da tsarin:

sudo chmod 700 /run/media/

Tabbas, dole ne suyi la'akari da cewa tushen mai amfani kawai yana da izini don ɗora na'urorin USB, saboda a lokacin mai amfani zai iya hawa USB ɗin a cikin wani babban fayil kuma ya ƙetare ƙuntatawarmu.

Da zarar an gama wannan, na'urorin USB lokacin da aka haɗa su za a ɗora su, amma babu sanarwar da za ta bayyana ga mai amfani, kuma ba za su sami damar shiga babban fayil ɗin ko wani abu kai tsaye ba.

Karshe!

Akwai wasu sauran hanyoyin da aka bayyana akan yanar gizo, misali amfani da Grub ... amma, kuyi tsammani, baiyi min aiki ba either

Na sanya zabi da yawa (duk da cewa ba duka suka yi min aiki ba) saboda wani abokina ya sayi kyamarar dijital a kayayyakin fasahar kantin yanar gizo a cikin Chile, ya tuna da wannan rubutun lekenan- usb.sh cewa dan lokaci da suka gabata na bayyana ananNa tuna, yana aiki ne don rah onto kan na'urorin USB da satar bayanai daga waɗannan) kuma ya tambaye ni ko akwai wata hanya da za ta hana a saci bayanai daga sabuwar kyamararsa, ko kuma a kalla wasu hanyoyin da za a toshe na'urorin USB a kwamfutarsa ​​ta gida.

Koyaya, kodayake wannan ba kariya bane ga kyamarar ku akan dukkan kwamfutocin da zaku iya haɗa ta, aƙalla zata iya kare PC ɗin gida daga cire bayanai masu mahimmanci ta hanyar na'urorin USB.

Ina fatan ya kasance mai amfani a gare ku (kamar yadda koyaushe) yake, idan wani ya san wata hanya don hana izinin USB a cikin Linux kuma tabbas, yana aiki ba tare da matsaloli ba, bari mu sani.


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

14 comments, bar naka

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   SnKisuke m

    Wata hanyar da zata yiwu don hana hawa ajiyar USB na iya zama ta hanyar canza dokoki a cikin udev http://www.reactivated.net/writing_udev_rules.html#example-usbhdd, ta hanyar gyara dokar ta yadda saika kawai zata iya hawa na'urorin usb_storage, ina ganin zai zama hanyar "zato". Murna

  2.   OtakuLogan m

    A cikin Debian wiki sun ce kada su toshe modula kai tsaye a cikin fileet /etc/modprobe.d/blacklist (.conf), amma a cikin mai zaman kansa wanda ya ƙare da .conf: https://wiki.debian.org/KernelModuleBlacklisting . Ban sani ba idan abubuwa sun bambanta a cikin Arch, amma ba tare da gwada shi akan USB ba a kan kwamfutata yana aiki kamar haka tare, misali, tare da bumblebee da pcspkr.

    1.    OtakuLogan m

      Kuma ina tsammanin Arch yayi amfani da wannan hanyar, dama? https://wiki.archlinux.org/index.php/kernel_modules#Blacklisting .

  3.   rudamacho m

    Ina tsammanin mafi kyawun zaɓi ta canza izini zai zama ƙirƙirar takamaiman rukuni don / kafofin watsa labarai, misali "pendrive", sanya wannan rukunin zuwa / kafofin watsa labarai kuma ba da izini 770, don haka za mu iya sarrafa wanda zai iya amfani da abin da aka ɗora a kan / kafofin watsa labarai ta ƙara mai amfani a cikin ƙungiyar «pendrive», ina fatan kun fahimta 🙂

  4.   iskalotl m

    Barka dai, KZKG ^ Gaara, a wannan yanayin muna iya amfani da kayan aiki, tare da wannan zamu cimma hakan yayin shigar da na'urar USB ɗin sai tsarin ya nemi mu tabbatar da mai amfani ko tushe kafin hawa shi.
    Ina da wasu bayanai kan yadda na yi shi, a safiyar Lahadi na sanya shi.

    Na gode.

  5.   iskalotl m

    Bayar da cigaba ga sakon game da amfani da kundin siyasa kuma ganin cewa a wannan lokacin ban sami damar yin post ba (Ina jin saboda canje-canjen da suka faru a Desdelinux UsemosLinux) Na bar ku kamar yadda nayi don hana masu amfani hawa na'urorin USB. Wannan a ƙarƙashin Debian 7.6 tare da Gnome 3.4.2

    1.- Bude file /usr/share/polkit-1/actions/org.freedesktop.udisks.policy
    2.- Muna neman sashin «»
    3.- Mun canza masu zuwa:

    "Kuma shi ne"

    por:

    "Auth_admin"

    Shirya !! wannan zai buƙaci ka gaskata matsayin tushen yayin ƙoƙarin hawa na'urar USB.

    Abubuwan da suka shafi:
    http://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html
    http://scarygliders.net/2012/06/20/a-brief-guide-to-policykit/
    http://lwn.net/Articles/258592/

    Na gode.

    1.    Raidel ba m

      A mataki na 2 Ban fahimci wane bangare kuke nufi ba "Ni mafari ne."

      Godiya ga taimako.

  6.   wannan sunan m

    Wata hanyar: ƙara zaɓi "nousb" a cikin layin umarnin kernel boot, wanda ya haɗa da shirya gurnani ko yin amfani da fayil din jeri.

    nousb - Kashe tsarin USB.
    Idan wannan zaɓi ya kasance, ba za a fara tsarin USB ba.

  7.   Raidel ba m

    Yadda ake tuna cewa tushen mai amfani kawai yana da izini don ɗaga na'urorin USB kuma sauran masu amfani basa dashi.

    gracias.

    1.    KZKG ^ Gaara m

      Yadda za a tuna cewa daga cikin akwatin (kamar wanda kuke amfani da shi) ya hau kan na'urorin USB kai tsaye, ko dai Unity, Gnome ko KDE ... ko dai ta amfani da kundin siyasa ko kuma dbus, saboda tsarin ne yake hawa su, ba mai amfani ba.

      Don ba komai 😉

  8.   Victor m

    Kuma idan ina so in soke sakamakon
    sudo chmod 700 / ma'ana /

    Me zan saka a cikin tashar don sake samun damar shiga USB?

    gracias

  9.   m m

    Wannan baya aiki idan kun haɗa wayarku ta hannu da kebul na USB.

  10.   ruyz m

    sudo chmod 777 / kafofin watsa labarai / don sake ba da damar.

    Na gode.

  11.   Maurel reyes m

    Wannan ba mai yiwuwa bane. Yakamata su hau kebul kawai a cikin adireshin ban da / kafofin watsa labarai.

    Idan kashe kebul ɗin USB ɗin ba ya aiki a gare ku, ya kamata ku ga wanne module ɗin da ake amfani da shi don tashoshin USB ɗin ku. wataƙila kuna naƙasa wanda bai dace ba.

bool (gaskiya)