1

The scenario

You have an USB stick storage. You just want to use it only from your computer. It should be auto mounted from your computer and it should be available to all users of your computer before any login (Like network connection).

However, if any some one else decided, even you, to use it from another computer, this stick should not be mounted at all. It may be appeared as faulty or it should be formatted first.

The assignment of term specific machine may be done by comparing hash value in a specific file on the system or using MAC address or any other way.

SaidbakR
  • 769
  • 3
    Best you can do is probably encrypt the USB stick. The mounting options are under control of the OS, not the stick itself. – Sergiy Kolodyazhnyy Jul 02 '18 at 06:34
  • @can't we do it by adding the MAC address of the computer with inode table? – damadam Jul 02 '18 at 07:18
  • @SergiyKolodyazhnyy The problem is encryption needs login to be decrypted ! I just need it to work without login. – SaidbakR Jul 02 '18 at 07:19
  • 2
    @SaidbakR I understand that. But USB sticks are made as simple storage devices, they don't have capabilities to refuse computer from mounting, and devices that can subvert OS control are usually created as malicious devices. And if we're starting to talk about USB stick architecture, then we're getting out of the scope of this site. – Sergiy Kolodyazhnyy Jul 02 '18 at 07:28
  • In other words, according to what I have understood from you , there is nothing like autorun such as found in Windows that allows execute script placed on the USB automatically in which a check for something is occurred, if the check true continue as usual otherwise the USB should be formatted? @SergiyKolodyazhnyy – SaidbakR Jul 02 '18 at 07:34
  • 2
    @SaidbakR There are ways to autorun things. Particularly this post: https://askubuntu.com/q/642511/295286 But then again autorun is kinda GUI feature, and I don't think it'd have any effect if somebody mounted USB stick from command-line. This would be half-security: maybe works against inexperienced attacker, but kinda useless against experienced one. – Sergiy Kolodyazhnyy Jul 02 '18 at 07:44
  • 1
    +1 An interesting question, although largely outside the scope of the site. – Jos Jul 02 '18 at 08:29
  • @Jos Yes, it is like making a security dongle for your distributed apps that works from an USB stick! – SaidbakR Jul 02 '18 at 08:44

0 Answers0