Raspberry Pi 3, Notizen

dd bs=4M if=2018-04-18-raspbian-stretch.img of=/dev/sdX conv=fsync
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=20586949-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

enable_uart=1
start_x=1
gpu_mem=128

#dtoverlay=spi-bcm2835
dtoverlay=spi0-hw-cs
pi@raspberrypi:~$ sudo useradd andreas

pi@raspberrypi:~$ sudo apt-get install openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openssh-server is already the newest version (1:7.4p1-10+deb9u3).
openssh-server set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

pi@raspberrypi:~$ sudo systemctl enable ssh
Synchronizing state of ssh.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ssh
Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.

pi@raspberrypi:~$ sudo systemctl start ssh

pi@raspberrypi:~$ sudo adduser andreas
Adding user `andreas' ...
Adding new group `andreas' (1001) ...
Adding new user `andreas' (1001) with group `andreas' ...
Creating home directory `/home/andreas' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for andreas
Enter the new value, or press ENTER for the default
	Full Name [Andreas Bachman]: bachman0
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y

pi@raspberrypi:~$ sudo vi /etc/sudoers
andreas ALL=(ALL) NOPASSWD: ALL


pi@raspberrypi:~$ sudo apt-get install samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  attr libaio1 libavahi-client3 libcups2 libfile-copy-recursive-perl
  libgpgme11 libldb1 libpython2.7 libtdb1 libtevent0 python-crypto
  python-dnspython python-ldb python-samba python-talloc python-tdb
  samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules tdb-tools
  update-inetd
Suggested packages:
  cups-common gpgsm python-crypto-dbg python-crypto-doc python-gpgme bind9
  bind9utils ctdb ldb-tools ntp | chrony smbldap-tools winbind ufw
  heimdal-clients
The following NEW packages will be installed:
  attr libaio1 libavahi-client3 libcups2 libfile-copy-recursive-perl
  libgpgme11 libldb1 libpython2.7 libtdb1 libtevent0 python-crypto
  python-dnspython python-ldb python-samba python-talloc python-tdb samba
  samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules tdb-tools
  update-inetd
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,643 kB of archives.
After this operation, 49.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf python-dnspython all 1.15.0-1 [102 kB]
Get:2 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf python-crypto armhf 2.6.1-7 [253 kB]
Get:3 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf libtdb1 armhf 1.3.11-2 [38.0 kB]
Get:4 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf libtevent0 armhf 0.9.31-1 [24.7 kB]
Get:5 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf libldb1 armhf 2:1.1.27-1 [92.1 kB]
Get:6 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf libpython2.7 armhf 2.7.13-2+deb9u2 [914 kB]
Get:7 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf python-ldb armhf 2:1.1.27-1 [30.0 kB]
Get:8 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf python-tdb armhf 1.3.11-2 [15.3 kB]
Get:9 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf python-talloc armhf 2.1.8-1 [11.3 kB]
Get:10 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf libavahi-client3 armhf 0.6.32-2 [51.3 kB]
Get:11 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf libcups2 armhf 2.2.1-8 [272 kB]
Get:12 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf samba-libs armhf 2:4.5.12+dfsg-2+deb9u2 [4,377 kB]
Get:13 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf python-samba armhf 2:4.5.12+dfsg-2+deb9u2 [1,143 kB]
Get:14 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf samba-common-bin armhf 2:4.5.12+dfsg-2+deb9u2 [555 kB]
Get:15 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf tdb-tools armhf 1.3.11-2 [25.7 kB]
Get:16 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf libfile-copy-recursive-perl all 0.38-1 [20.6 kB]
Get:17 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf update-inetd all 4.44 [20.8 kB]
Get:18 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf samba armhf 2:4.5.12+dfsg-2+deb9u2 [869 kB]
Get:19 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf attr armhf 1:2.4.47-2 [41.3 kB]
Get:20 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf libaio1 armhf 0.3.110-3 [9,366 B]
Get:21 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf libgpgme11 armhf 1.8.0-3 [141 kB]
Get:22 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf samba-dsdb-modules armhf 2:4.5.12+dfsg-2+deb9u2 [304 kB]
Get:23 http://mirror.switch.ch/ftp/mirror/raspbian/raspbian stretch/main armhf samba-vfs-modules armhf 2:4.5.12+dfsg-2+deb9u2 [334 kB]
Fetched 9,643 kB in 7s (1,259 kB/s)                                            
Preconfiguring packages ...
Selecting previously unselected package python-dnspython.
(Reading database ... 35265 files and directories currently installed.)
Preparing to unpack .../00-python-dnspython_1.15.0-1_all.deb ...
Unpacking python-dnspython (1.15.0-1) ...
Selecting previously unselected package python-crypto.
Preparing to unpack .../01-python-crypto_2.6.1-7_armhf.deb ...
Unpacking python-crypto (2.6.1-7) ...
Selecting previously unselected package libtdb1:armhf.
Preparing to unpack .../02-libtdb1_1.3.11-2_armhf.deb ...
Unpacking libtdb1:armhf (1.3.11-2) ...
Selecting previously unselected package libtevent0:armhf.
Preparing to unpack .../03-libtevent0_0.9.31-1_armhf.deb ...
Unpacking libtevent0:armhf (0.9.31-1) ...
Selecting previously unselected package libldb1:armhf.
Preparing to unpack .../04-libldb1_2%3a1.1.27-1_armhf.deb ...
Unpacking libldb1:armhf (2:1.1.27-1) ...
Selecting previously unselected package libpython2.7:armhf.
Preparing to unpack .../05-libpython2.7_2.7.13-2+deb9u2_armhf.deb ...
Unpacking libpython2.7:armhf (2.7.13-2+deb9u2) ...
Selecting previously unselected package python-ldb.
Preparing to unpack .../06-python-ldb_2%3a1.1.27-1_armhf.deb ...
Unpacking python-ldb (2:1.1.27-1) ...
Selecting previously unselected package python-tdb.
Preparing to unpack .../07-python-tdb_1.3.11-2_armhf.deb ...
Unpacking python-tdb (1.3.11-2) ...
Selecting previously unselected package python-talloc.
Preparing to unpack .../08-python-talloc_2.1.8-1_armhf.deb ...
Unpacking python-talloc (2.1.8-1) ...
Selecting previously unselected package libavahi-client3:armhf.
Preparing to unpack .../09-libavahi-client3_0.6.32-2_armhf.deb ...
Unpacking libavahi-client3:armhf (0.6.32-2) ...
Selecting previously unselected package libcups2:armhf.
Preparing to unpack .../10-libcups2_2.2.1-8_armhf.deb ...
Unpacking libcups2:armhf (2.2.1-8) ...
Selecting previously unselected package samba-libs:armhf.
Preparing to unpack .../11-samba-libs_2%3a4.5.12+dfsg-2+deb9u2_armhf.deb ...
Unpacking samba-libs:armhf (2:4.5.12+dfsg-2+deb9u2) ...
Selecting previously unselected package python-samba.
Preparing to unpack .../12-python-samba_2%3a4.5.12+dfsg-2+deb9u2_armhf.deb ...
Unpacking python-samba (2:4.5.12+dfsg-2+deb9u2) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../13-samba-common-bin_2%3a4.5.12+dfsg-2+deb9u2_armhf.deb ...
Unpacking samba-common-bin (2:4.5.12+dfsg-2+deb9u2) ...
Selecting previously unselected package tdb-tools.
Preparing to unpack .../14-tdb-tools_1.3.11-2_armhf.deb ...
Unpacking tdb-tools (1.3.11-2) ...
Selecting previously unselected package libfile-copy-recursive-perl.
Preparing to unpack .../15-libfile-copy-recursive-perl_0.38-1_all.deb ...
Unpacking libfile-copy-recursive-perl (0.38-1) ...
Selecting previously unselected package update-inetd.
Preparing to unpack .../16-update-inetd_4.44_all.deb ...
Unpacking update-inetd (4.44) ...
Selecting previously unselected package samba.
Preparing to unpack .../17-samba_2%3a4.5.12+dfsg-2+deb9u2_armhf.deb ...
Unpacking samba (2:4.5.12+dfsg-2+deb9u2) ...
[  615.677679] Under-voltage detected! (0x00050005)
Selecting previously unselected package attr.
Preparing to unpack .../18-attr_1%3a2.4.47-2_armhf.deb ...
Unpacking attr (1:2.4.47-2) ...
Selecting previously unselected package libaio1:armhf.
Preparing to unpack .../19-libaio1_0.3.110-3_armhf.deb ...
Unpacking libaio1:armhf (0.3.110-3) ...
Selecting previously unselected package libgpgme11:armhf.
Preparing to unpack .../20-libgpgme11_1.8.0-3_armhf.deb ...
Unpacking libgpgme11:armhf (1.8.0-3) ...
Selecting previously unselected package samba-dsdb-modules.
Preparing to unpack .../21-samba-dsdb-modules_2%3a4.5.12+dfsg-2+deb9u2_armhf.deb ...
Unpacking samba-dsdb-modules (2:4.5.12+dfsg-2+deb9u2) ...
Selecting previously unselected package samba-vfs-modules.
Preparing to unpack .../22-samba-vfs-modules_2%3a4.5.12+dfsg-2+deb9u2_armhf.deb ...
Unpacking samba-vfs-modules (2:4.5.12+dfsg-2+deb9u2) ...
Setting up python-dnspython (1.15.0-1) ...
Setting up libtdb1:armhf (1.3.11-2) ...
Setting up python-crypto (2.6.1-7) ...
Setting up libgpgme11:armhf (1.8.0-3) ...
Setting up libtevent0:armhf (0.9.31-1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up libaio1:armhf (0.3.110-3) ...
Processing triggers for systemd (232-25+deb9u2) ...
Setting up libpython2.7:armhf (2.7.13-2+deb9u2) ...
Setting up tdb-tools (1.3.11-2) ...
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode
Processing triggers for man-db (2.7.6.1-2) ...
[  626.077803] Under-voltage detected! (0x00050005)
Setting up libavahi-client3:armhf (0.6.32-2) ...
Setting up attr (1:2.4.47-2) ...
Setting up libfile-copy-recursive-perl (0.38-1) ...
Setting up libcups2:armhf (2.2.1-8) ...
Setting up python-talloc (2.1.8-1) ...
Setting up update-inetd (4.44) ...
Setting up python-tdb (1.3.11-2) ...
Setting up libldb1:armhf (2:1.1.27-1) ...
Setting up python-ldb (2:1.1.27-1) ...
Setting up samba-libs:armhf (2:4.5.12+dfsg-2+deb9u2) ...
Setting up samba-vfs-modules (2:4.5.12+dfsg-2+deb9u2) ...
Setting up python-samba (2:4.5.12+dfsg-2+deb9u2) ...
Setting up samba-common-bin (2:4.5.12+dfsg-2+deb9u2) ...
Setting up samba-dsdb-modules (2:4.5.12+dfsg-2+deb9u2) ...
Setting up samba (2:4.5.12+dfsg-2+deb9u2) ...
Adding group `sambashare' (GID 113) ...
Done.
Samba is not being run as an AD Domain Controller, masking samba-ad-dc-service.
Please ignore the following error about deb-systemd-helper not finding samba-ad-dc-service.
Created symlink /etc/systemd/system/multi-user.target.wants/nmbd.service → /lib/systemd/system/nmbd.service.
[  642.717966] Under-voltage detected! (0x00050005)
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service → /lib/systemd/system/smbd.service.
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u2) ...

$ sudo vi /etc/samba/smb.conf 

security = user
read only = no

$ sudo /etc/init.d/samba restart
Restarting nmbd (via systemctl): nmbd.service.
Restarting smbd (via systemctl): smbd.service.

$ sudo smbpasswd -a andreas
New SMB password:
Retype new SMB password:
Added user andreas.

Leave a Reply

Your email address will not be published. Required fields are marked *