Anzeige:
Ergebnis 1 bis 8 von 8

Thema: Container mit Veracrypt beim Systemstart mounten

  1. #1
    Registrierter Benutzer
    Registriert seit
    Jul 2014
    Beiträge
    18

    Container mit Veracrypt beim Systemstart mounten

    Hallo.

    Ich würde gerne ein Container das mit Veracrypt erstellt wurde beim Systemstart von Debian mounten. Wie mache ich das?

    Vermutlich werde ich dazu ein Command Befehl brauchen. Mit:

    Code:
    veracrypt --mount /pfad/zum/container -p "containerpasswort"
    kann ich ein Container im Terminal mit Administratorrechten einhängen. Allerdings habe ich keine Berechtigung darauf zuzugreifen.

    Ich schätze ich müsste das dann in fstab oder in rc.local eintragen, damit das beim Systemstart ausgeführt wird.
    Hat jemand damit bereits Erfahrungen?

  2. #2
    Newbie and practicing Avatar von Newbie314
    Registriert seit
    Mar 2007
    Beiträge
    7.639
    Wo liegt der Sinn in einem verschlüsselten Container wenn man das Passwort im Klartext auf der Platte lagert ? Das kommt mir vor wie den Hausschlüssel unter der Fußmatte zu lagern.

    Jedenfalls geht es mit der /p Option: https://veracrypt.codeplex.com/wikip...20Line%20Usage
    Bei Konsolenausgaben / Fehlermeldungen bitte immer Code Tags verwenden: [code] -Text- [/code]
    "Überzeugungen sind gefährlichere Feinde der Wahrheit als Lügen" (H. Lesch)

  3. #3
    Registrierter Benutzer
    Registriert seit
    Jul 2014
    Beiträge
    18
    Wo liegt der Sinn in einem verschlüsselten Container wenn man das Passwort im Klartext auf der Platte lagert ?
    Debian wird eine Systemverschlüsselung haben und den Internetzugang wird es nur in einer VM geben. Also müsste einer erst mal aus der VM ausbrechen, um an den Schlüssel ran zu kommen, was eigentlich nicht unmöglich ist. Oder sehe ich das falsch?

    Der Container wäre aber nicht auf der Systempartition sondern auf einer externen Platte abgelegt. So meine Vorstellung.

    Wenn man das Öffnen des Containers noch besser automatisieren kann, dann würde ich es gerne wissen.
    Geändert von Sven3v (06.10.15 um 22:19 Uhr)

  4. #4
    Newbie and practicing Avatar von Newbie314
    Registriert seit
    Mar 2007
    Beiträge
    7.639
    Da gab es noch eine Option mit einem "Keyfile" das du z.B. auf einem extern gemounteten USB Stick lagern könntest. D.h. das Volume würde automatisch geöffnet- wie du es willst, aber nur wenn der "Schlüssel" in einem USB Port steckt.

    Das wäre die Automatisierung- und eine etwas sicherere Methode. Sicherheit und Komfort sind immer ein Zielkonflikt, es kommt auf einen Kompromiss an der bequem und sicher genug für _deine_ Zwecke ist.
    Bei Konsolenausgaben / Fehlermeldungen bitte immer Code Tags verwenden: [code] -Text- [/code]
    "Überzeugungen sind gefährlichere Feinde der Wahrheit als Lügen" (H. Lesch)

  5. #5
    Registrierter Benutzer
    Registriert seit
    Jul 2014
    Beiträge
    18
    Ich habe die Option -p mit /p getauscht und habe danach eine Fehlermeldung bekommen:
    "Incorrect command line specified."

    Nach der Eingabe von "veracrypt -h" habe ich das hier erhalten:

    Code:
      --auto-mount=<str>         	Auto mount device-hosted/favorite volumes
      --backup-headers           	Backup volume headers
      --background-task          	Start Background Task
      -C, --change               	Change password or keyfiles
      -c, --create               	Create new volume
      --create-keyfile           	Create new keyfile
      --delete-token-keyfiles    	Delete security token keyfiles
      -d, --dismount             	Dismount volume
      --display-password         	Display password while typing
      --encryption=<str>         	Encryption algorithm
      --explore                  	Open explorer window for mounted volume
      --export-token-keyfile     	Export keyfile from security token
      --filesystem=<str>         	Filesystem type
      -f, --force                	Force mount/dismount/overwrite
      --fs-options=<str>         	Filesystem mount options
      --hash=<str>               	Hash algorithm
      -h, --help                 	Display detailed command line help
      --import-token-keyfiles    	Import keyfiles to security token
      -k, --keyfiles=<str>       	Keyfiles
      -l, --list                 	List mounted volumes
      --list-token-keyfiles      	List security token keyfiles
      --load-preferences         	Load user preferences
      --mount                    	Mount volume interactively
      -m, --mount-options=<str>  	VeraCrypt volume mount options
      --new-hash=<str>           	New hash algorithm
      --new-keyfiles=<str>       	New keyfiles
      --new-password=<str>       	New password
      --new-pim=<str>            	New PIM
      --non-interactive          	Do not interact with user
      --stdin                    	Read password from standard input
      -p, --password=<str>       	Password
      --pim=<str>                	PIM
      --protect-hidden=<str>     	Protect hidden volume
      --protection-hash=<str>    	Hash algorithm for protected hidden volume
      --protection-keyfiles=<str>	Keyfiles for protected hidden volume
      --protection-password=<str>	Password for protected hidden volume
      --protection-pim=<str>     	PIM for protected hidden volume
      --random-source=<str>      	Use file as source of random data
      --restore-headers          	Restore volume headers
      --save-preferences         	Save user preferences
      --quick                    	Enable quick format
      --size=<str>               	Size in bytes
      --slot=<str>               	Volume slot number
      -tc, --truecrypt           	Enable TrueCrypt mode. Should be put first to avoid issues.
      --test                     	Test internal algorithms
      -t, --text                 	Use text user interface
      --token-lib=<str>          	Security token library
      -v, --verbose              	Enable verbose output
      --version                  	Display version information
      --volume-properties        	Display volume properties
      --volume-type=<str>        	Volume type
    und das hier:

    Code:
    Synopsis:
    
    veracrypt [OPTIONS] COMMAND
    veracrypt [OPTIONS] VOLUME_PATH [MOUNT_DIRECTORY]
    
    
    Commands:
    
    --auto-mount=devices|favorites
     Auto mount device-hosted or favorite volumes.
    
    --backup-headers[=VOLUME_PATH]
     Backup volume headers to a file. All required options are requested from the
     user.
    
    -c, --create[=VOLUME_PATH]
     Create a new volume. Most options are requested from the user if not specified
     on command line. See also options --encryption, -k, --filesystem, --hash, -p,
     --random-source, --quick, --size, --volume-type. Note that passing some of the
     options may affect security of the volume (see option -p for more information).
    
     Inexperienced users should use the graphical user interface to create a hidden
     volume. When using the text user interface, the following procedure must be
     followed to create a hidden volume:
      1) Create an outer volume with no filesystem.
      2) Create a hidden volume within the outer volume.
      3) Mount the outer volume using hidden volume protection.
      4) Create a filesystem on the virtual device of the outer volume.
      5) Mount the new filesystem and fill it with data.
      6) Dismount the outer volume.
      If at any step the hidden volume protection is triggered, start again from 1).
    
    --create-keyfile[=FILE_PATH]
     Create a new keyfile containing pseudo-random data.
    
    -C, --change[=VOLUME_PATH]
     Change a password and/or keyfile(s) of a volume. Most options are requested
     from the user if not specified on command line. PKCS-5 PRF HMAC hash
     algorithm can be changed with option --hash. See also options -k,
     --new-keyfiles, --new-password, -p, --random-source.
    
    -d, --dismount[=MOUNTED_VOLUME]
     Dismount a mounted volume. If MOUNTED_VOLUME is not specified, all
     volumes are dismounted. See below for description of MOUNTED_VOLUME.
    
    --delete-token-keyfiles
     Delete keyfiles from security tokens. See also command --list-token-keyfiles.
    
    --export-token-keyfile
     Export a keyfile from a security token. See also command --list-token-keyfiles.
    
    --import-token-keyfiles
     Import keyfiles to a security token. See also option --token-lib.
    
    -l, --list[=MOUNTED_VOLUME]
     Display a list of mounted volumes. If MOUNTED_VOLUME is not specified, all
     volumes are listed. By default, the list contains only volume path, virtual
     device, and mount point. A more detailed list can be enabled by verbose
     output option (-v). See below for description of MOUNTED_VOLUME.
    
    --list-token-keyfiles
     Display a list of all available security token keyfiles. See also command
     --import-token-keyfiles.
    
    --mount[=VOLUME_PATH]
     Mount a volume. Volume path and other options are requested from the user
     if not specified on command line.
    
    --restore-headers[=VOLUME_PATH]
     Restore volume headers from the embedded or an external backup. All required
     options are requested from the user.
    
    --save-preferences
     Save user preferences.
    
    --test
     Test internal algorithms used in the process of encryption and decryption.
    
    --version
     Display program version.
    
    --volume-properties[=MOUNTED_VOLUME]
     Display properties of a mounted volume. See below for description of
     MOUNTED_VOLUME.
    
    MOUNTED_VOLUME:
     Specifies a mounted volume. One of the following forms can be used:
     1) Path to the encrypted VeraCrypt volume.
     2) Mount directory of the volume's filesystem (if mounted).
     3) Slot number of the mounted volume (requires --slot).
    
    
    Options:
    
    --display-password
     Display password characters while typing.
    
    --encryption=ENCRYPTION_ALGORITHM
     Use specified encryption algorithm when creating a new volume.
    
    --filesystem=TYPE
     Filesystem type to mount. The TYPE argument is passed to mount(8) command
     with option -t. Default type is 'auto'. When creating a new volume, this
     option specifies the filesystem to be created on the new volume (only 'FAT'
     and 'none' TYPE is allowed). Filesystem type 'none' disables mounting or
     creating a filesystem.
    
    --force
     Force mounting of a volume in use, dismounting of a volume in use, or
     overwriting a file. Note that this option has no effect on some platforms.
    
    --fs-options=OPTIONS
     Filesystem mount options. The OPTIONS argument is passed to mount(8)
     command with option -o when a filesystem on a VeraCrypt volume is mounted.
     This option is not available on some platforms.
    
    --hash=HASH
     Use specified hash algorithm when creating a new volume or changing password
     and/or keyfiles. This option also specifies the mixing PRF of the random
     number generator.
    
    -k, --keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...]
     Use specified keyfiles when mounting a volume or when changing password
     and/or keyfiles. When a directory is specified, all files inside it will be
     used (non-recursively). Multiple keyfiles must be separated by comma.
     Use double comma (,,) to specify a comma contained in keyfile's name.
     Keyfile stored on a security token must be specified as
     token://slot/SLOT_NUMBER/file/FILENAME. An empty keyfile (-k "") disables
     interactive requests for keyfiles. See also options --import-token-keyfiles,
     --list-token-keyfiles, --new-keyfiles, --protection-keyfiles.
    
    --load-preferences
     Load user preferences.
    
    -m, --mount-options=OPTION1[,OPTION2,OPTION3,...]
     Specifies comma-separated mount options for a VeraCrypt volume:
      headerbak: Use backup headers when mounting a volume.
      nokernelcrypto: Do not use kernel cryptographic services.
      readonly|ro: Mount volume as read-only.
      system: Mount partition using system encryption.
      timestamp|ts: Do not restore host-file modification timestamp when a volume
       is dismounted (note that the operating system under certain circumstances
       does not alter host-file timestamps, which may be mistakenly interpreted
       to mean that this option does not work).
     See also option --fs-options.
    
    --new-keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...]
     Add specified keyfiles to a volume. This option can only be used with command
     -C.
    
    --new-password=PASSWORD
     Specifies a new password. This option can only be used with command -C.
    
    -p, --password=PASSWORD
     Use specified password to mount/open a volume. An empty password can also be
     specified (-p ""). Note that passing a password on the command line is
     potentially insecure as the password may be visible in the process list
     (see ps(1)) and/or stored in a command history file or system logs.
    
    --protect-hidden=yes|no
     Write-protect a hidden volume when mounting an outer volume. Before mounting
     the outer volume, the user will be prompted for a password to open the hidden
     volume. The size and position of the hidden volume is then determined and the
     outer volume is mounted with all sectors belonging to the hidden volume
     protected against write operations. When a write to the protected area is
     prevented, the whole volume is switched to read-only mode. Verbose list
     (-v -l) can be used to query the state of the hidden volume protection.
     Warning message is displayed when a volume switched to read-only is being
     dismounted.
    
    --protection-keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...]
     Use specified keyfiles to open a hidden volume to be protected. This option
     may be used only when mounting an outer volume with hidden volume protected.
     See also options -k and --protect-hidden.
    
    --protection-password=PASSWORD
     Use specified password to open a hidden volume to be protected. This option
     may be used only when mounting an outer volume with hidden volume protected.
     See also options -p and --protect-hidden.
    
    --quick
     Do not encrypt free space when creating a device-hosted volume. This option
     must not be used when creating an outer volume.
    
    --random-source=FILE
     Use FILE as a source of random data (e.g., when creating a volume) instead
     of requiring the user to type random characters.
    
    --slot=SLOT
     Use specified slot number when mounting, dismounting, or listing a volume.
    
    --size=SIZE
     Use specified size in bytes when creating a new volume.
    
    -t, --text
     Use text user interface. Graphical user interface is used by default if
     available. This option must be specified as the first argument.
    
    --token-lib=LIB_PATH
     Use specified PKCS #11 security token library.
    
    --volume-type=TYPE
     Use specified volume type when creating a new volume. TYPE can be 'normal'
     or 'hidden'. See option -c for more information on creating hidden volumes.
    
    -v, --verbose
     Enable verbose output.
    
    
    IMPORTANT:
    
    If you want to use VeraCrypt, you must follow the security requirements and
    security precautions listed in chapter 'Security Requirements and Precautions'
    in the VeraCrypt documentation (file 'VeraCrypt User Guide.pdf').
    
    
    Examples:
    
    Create a new volume:
    veracrypt -t -c
    
    Mount a volume:
    veracrypt volume.hc /media/veracrypt1
    
    Mount a volume as read-only, using keyfiles:
    veracrypt -m ro -k keyfile1,keyfile2 volume.tc
    
    Mount a volume without mounting its filesystem:
    veracrypt --filesystem=none volume.tc
    
    Mount a volume prompting only for its password:
    veracrypt -t -k "" --protect-hidden=no volume.hc /media/veracrypt1
    
    Dismount a volume:
    veracrypt -d volume.tc
    
    Dismount all mounted volumes:
    veracrypt -d
    Die Option -p im ersten Post war also schon richtig. Wie im ersten Post schon erwähnt, kann ich mit dem folgenden Befehl den Container zwar einhängen,

    Mit:
    Code:
    veracrypt --mount /pfad/zum/container -p "containerpasswort"
    oder mit:

    Code:
    veracrypt --mount /pfad/zum/container /media/veracrypt1  -p "containerpasswort"
    aber wenn der Container im Terminal mit Administratorrechten eingehängt worden ist, habe ich keine Berechtigung drauf zuzugreifen.

  6. #6
    Newbie and practicing Avatar von Newbie314
    Registriert seit
    Mar 2007
    Beiträge
    7.639
    sudoers list

    Du musst den Mount unter dem User durchführen unter dem du zugreifen willst (dazu wird mount in der Sudoers List für deinen User freigeschaltet). Oder du gibst im Mount Befehl den Usern die Zugriffsberechtigung mit.
    Bei Konsolenausgaben / Fehlermeldungen bitte immer Code Tags verwenden: [code] -Text- [/code]
    "Überzeugungen sind gefährlichere Feinde der Wahrheit als Lügen" (H. Lesch)

  7. #7
    Registrierter Benutzer
    Registriert seit
    Jul 2014
    Beiträge
    18
    Unter dem User unter dem ich zugreifen wollte konnte ich nicht mounten. Da wurde eine Fehlermeldung angezeigt. Dann bleibt wohl das zweite übrig.
    Wie gebe ich im Mount Befehl den Usern die Zugriffsberechtigung mit?

  8. #8
    Newbie and practicing Avatar von Newbie314
    Registriert seit
    Mar 2007
    Beiträge
    7.639
    Siehe Beitrag 6. Sudoers Liste bearbeiten. Musst dir das aber ergooglen oder von jemand anderem erklären lassen da ich die lange nicht mehr benutzt habe. Einfacher aber auch weniger sicher ist die suid Geschichte: Skript unter root erstellen und suid bit setzen und dann für die Gruppe der User die es verwenden sollen freigeben: https://de.wikipedia.org/wiki/Setuid
    Bei Konsolenausgaben / Fehlermeldungen bitte immer Code Tags verwenden: [code] -Text- [/code]
    "Überzeugungen sind gefährlichere Feinde der Wahrheit als Lügen" (H. Lesch)

Ähnliche Themen

  1. Probleme beim mounten von einem loop-aes Container
    Von magicxs im Forum System installieren und konfigurieren
    Antworten: 2
    Letzter Beitrag: 18.04.09, 19:43
  2. interne Festplatte beim Systemstart mounten
    Von schneemensch im Forum Linux Allgemein
    Antworten: 9
    Letzter Beitrag: 24.01.06, 08:22
  3. USB Festplatte beim Systemstart(!) mit-mounten
    Von Andy09 im Forum System installieren und konfigurieren
    Antworten: 3
    Letzter Beitrag: 17.02.05, 01:07
  4. Antworten: 1
    Letzter Beitrag: 26.10.03, 13:26
  5. Verschlüsselte reiserfs-Partition beim Systemstart mounten
    Von uma im Forum System installieren und konfigurieren
    Antworten: 2
    Letzter Beitrag: 30.11.01, 18:36

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •