- Code: Alles auswählen
sudo -l
id
hostname
uname -n
cat /etc/hosts
Für sudo gibts du übrigens immer nur dein Benutzer-Passwort ein, mit dem root-Passwort hat das nichts zu tun.
Der Sinn an sudo ist ja, dass man nur das Benutzer-Passwort braucht.
sudo -l
id
hostname
uname -n
cat /etc/hosts
bash-4.2$
bash-4.2$ sudo -l
[sudo] password for bruno:
Sorry, user bruno may not run sudo on linux.
bash-4.2$
bash-4.2$ id
uid=1000(bruno) gid=4(adm) Gruppen=4(adm),0(root),1(bin),2(daemon),3(sys),5(tty),6(disk),7(lp),8(mem),9(kmem),10(wheel),12(mail),13(news),14(uucp),15(man),19(floppy),20(games),21(tape),22(cdrom),24(utmp),25(shadow),26(chkpwd),27(auth),43(usb),80(cdwriter),81(audio),82(video),83(dialout),96(hsqldb),100(users),486(clamav),487(mlocate),488(ctools),489(ntools),490(xgrp),491(gdm),492(vcsa),493(rtkit),494(usbmux),495(rpm),496(avahi-autoipd),497(avahi),498(lock),499(messagebus),1000(bruno),65534(nogroup)
bash-4.2$ hostname
linux.fritz.box
bash-4.2$ uname -n
linux.fritz.box
bash-4.2$ cat /etc/hosts
# generated by drakconnect
127.0.0.1 localhost
bash-4.2$
doktor5000 hat geschrieben:Du solltest vermutlich das localhost= wieder aus der sudoers entfernen, da dein Rechnername nicht sauber gesetzt wurde.
sudo würde die Befehle nur auf dem Rechne namens linux erlauben, komplett heißt er aber linux.fritz.box
Dazu als root nochmal visudo eingeben, und dann den Cursor an den Anfang von localhost= bewegen, dann mittels mehrmaligem Druck
auf x löschen. Dann wieder mittels Esc und :wq speichern, und nochmal versuchen.
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
#
bruno localhost=/run/media/bruno/DTVP/linux/linux32/dtvp_login
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
#
bruno /run/media/bruno/DTVP/linux/linux32/dtvp_login
BrunoHa hat geschrieben:Wenn ich aus dieser Zeile
Code: Alles auswählen
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
#
bruno localhost=/run/media/bruno/DTVP/linux/linux32/dtvp_login
das mache,
Code: Alles auswählen
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
#
bruno /run/media/bruno/DTVP/linux/linux32/dtvp_login
wird syntaxerror gemeldet.
# Defaults specification
#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
# You have to run "ssh -t hostname sudo <cmd>".
#
Defaults requiretty
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
#
bruno localhost=/run/media/bruno/DTVP/linux/linux32/dtvp_login
100,0-1 Ende
alf hat geschrieben:BrunoHa hat geschrieben:Dann wäre "localhost" durch den vollqualifizierten Hostnamen zu ersetzen oder aber duch "ALL".
file ./dtvp_login
#urpmi strace
strace ./dtvp_login
wanne hat geschrieben:so aus interesse: bekomme ich mal ein
- Code: Alles auswählen
file ./dtvp_login
Wenn es ein script ist würde mich der Inhalt interesseieren ansonsten mal
- Code: Alles auswählen
#urpmi strace
strace ./dtvp_login
Achtung: Bei strace sieht man das PW also wenn du es nicht ändern kannst mal das falsche eingeben. (Wobei mich eigentlich einmal ein richtiger interressieren würde. Ist aber wohl wirklich ein sicherheitsproblem. (Zumal die teilweise nur oberflächlich das PW ändern aber auf dem Stick immer das gleiche bleibt.))
doktor5000 hat geschrieben:Wie gesagt, der nächste Schritt wäre, das komplett zu automatisieren, sprich das Einstöpseln des Sticks bzw. Mounten löst das Entschlüsseln direkt aus. Meld dich einfach wenn du das nachvollzogen hast oder auch wenn noch Erklärungsbedarf besteht
tailf /var/log/messages
Feb 26 21:26:01 Mageia2 kernel: [243164.733041] usb 8-3: new high-speed USB device number 9 using ehci_hcd
Feb 26 21:26:01 Mageia2 kernel: [243164.848527] usb 8-3: New USB device found, idVendor=13fe, idProduct=5200
Feb 26 21:26:01 Mageia2 kernel: [243164.848532] usb 8-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 26 21:26:01 Mageia2 kernel: [243164.848536] usb 8-3: Product: Accelerate
Feb 26 21:26:01 Mageia2 kernel: [243164.848538] usb 8-3: Manufacturer: SHARKOON
Feb 26 21:26:01 Mageia2 kernel: [243164.848541] usb 8-3: SerialNumber: 07072BBA80A54337
Feb 26 21:26:01 Mageia2 kernel: [243164.848892] scsi11 : usb-storage 8-3:1.0
Feb 26 21:26:01 Mageia2 mtp-probe: checking bus 8, device 9: "/sys/devices/pci0000:00/0000:00:1d.7/usb8/8-3"
Feb 26 21:26:01 Mageia2 mtp-probe: bus: 8, device: 9 was not an MTP device
Feb 26 21:26:02 Mageia2 kernel: [243165.850675] scsi 11:0:0:0: Direct-Access SHARKOON Accelerate PMAP PQ: 0 ANSI: 6
Feb 26 21:26:02 Mageia2 kernel: [243165.851423] sd 11:0:0:0: [sdc] 61800448 512-byte logical blocks: (31.6 GB/29.4 GiB)
Feb 26 21:26:02 Mageia2 kernel: [243165.853450] sd 11:0:0:0: [sdc] Write Protect is off
Feb 26 21:26:02 Mageia2 kernel: [243165.854783] sd 11:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Feb 26 21:26:02 Mageia2 kernel: [243166.037950] sdc: sdc1
Feb 26 21:26:02 Mageia2 kernel: [243166.042053] sd 11:0:0:0: [sdc] Attached SCSI removable disk
bash-4.2$ su
Passwort:
[root@linux bruno]# tailf /var/log/messages
Feb 26 21:54:25 localhost kernel: [ 1571.096623] sr 8:0:0:1: Attached scsi generic sg5 type 5
Feb 26 21:54:25 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:54:25 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:54:25 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:54:26 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:54:26 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:54:26 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:54:26 localhost udisksd[1851]: Mounted /dev/sr1 at /run/media/bruno/DTVP on behalf of uid 1000
Feb 26 21:55:01 localhost kernel: [ 1607.014335] usb 2-1.4: USB disconnect, device number 6
Feb 26 21:55:01 localhost udisksd[1851]: Cleaning up mount point /run/media/bruno/DTVP (device 11:1 no longer exist)
Feb 26 21:56:21 localhost kernel: [ 1687.052354] usb 2-1.4: new high-speed USB device number 7 using ehci_hcd
Feb 26 21:56:21 localhost kernel: [ 1687.129708] usb 2-1.4: New USB device found, idVendor=0951, idProduct=160d
Feb 26 21:56:21 localhost kernel: [ 1687.129719] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 26 21:56:21 localhost kernel: [ 1687.129726] usb 2-1.4: Product: DTVault Privacy
Feb 26 21:56:21 localhost kernel: [ 1687.129731] usb 2-1.4: Manufacturer: Kingston
Feb 26 21:56:21 localhost kernel: [ 1687.129735] usb 2-1.4: SerialNumber: 001BFCA72FAEBBA040003415
Feb 26 21:56:21 localhost kernel: [ 1687.131123] scsi9 : usb-storage 2-1.4:1.0
Feb 26 21:56:21 localhost mtp-probe: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:02.1/usb2/2-1/2-1.4"
Feb 26 21:56:21 localhost mtp-probe: bus: 2, device: 7 was not an MTP device
Feb 26 21:56:23 localhost kernel: [ 1689.151648] scsi 9:0:0:0: Direct-Access Kingston DTVault Privacy PMAP PQ: 0 ANSI: 0 CCS
Feb 26 21:56:23 localhost kernel: [ 1689.153421] sd 9:0:0:0: Attached scsi generic sg4 type 0
Feb 26 21:56:25 localhost kernel: [ 1690.347882] scsi 9:0:0:1: CD-ROM Kingston DTVault Privacy PMAP PQ: 0 ANSI: 0 CCS
Feb 26 21:56:25 localhost kernel: [ 1690.351761] sd 9:0:0:0: [sdd] Attached SCSI removable disk
Feb 26 21:56:25 localhost kernel: [ 1690.352596] sr1: scsi3-mmc drive: 0x/0x writer tray
Feb 26 21:56:25 localhost kernel: [ 1690.353133] sr 9:0:0:1: Attached scsi generic sg5 type 5
Feb 26 21:56:25 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:56:25 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:56:25 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:56:25 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:56:25 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:56:25 localhost udisksd[1851]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Feb 26 21:56:25 localhost udisksd[1851]: Mounted /dev/sr1 at /run/media/bruno/DTVP on behalf of uid 1000
#Kingston-USB-Stick entschlüsseln
SUBSYSTEMS=="usb", SYSFS{serial}=="001BFCA72FAEBBA040003415", RUN+="sleep 10 && /usr/bin/consolehelper-gtk /run/media/bruno/DTVP/linux/linux32/dtvp_login"
SUBSYSTEMS=="scsi", KERNEL=="sr?", ATTRS{model}=="Kingston DTVault Privacy", RUN+="sleep 10 && /usr/bin/consolehelper-gtk /run/media/bruno/DTVP/linux/linux32/dtvp_login"
Wenn's dir nicht zu gefährlich ist sehr gerne!BrunoHa hat geschrieben:beides kein Problem. Die Datei oder die Dateien an PN oder wie?
Der allgeimeine Linux-Nutzer (ganz im Gegensatz zu den Entwicklern) ist sehr konservativ in seiner Arbeitswise. Wir beschäftigen uns mit so neumodischem Gram dan in 10 Jahren. (Wenn wir bis dahin nicht auf den kleinen Teufel neben uns ghört haben und bei BSD sind weil da alles noch schön wie 1970 ist.) Bis dahin ist alles außerhalb der fstab tabu.doktor5000 hat geschrieben:vielleicht fällt jemand anders etwas dazu ein
Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste