diff --git a/board/common/overlay/etc/samba/smb.conf b/board/common/overlay/etc/samba/smb.conf index 185b00af64..a10b0444f0 100644 --- a/board/common/overlay/etc/samba/smb.conf +++ b/board/common/overlay/etc/samba/smb.conf @@ -17,6 +17,7 @@ preferred master = no domain master = no local master = no + os level = 0 [sdcard] comment = SD Card Output Directory diff --git a/writeimage.sh b/writeimage.sh index 8cdc4db02f..c77327ba84 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -16,7 +16,7 @@ if [ -z "$1" ]; then usage fi -test "root" != "$USER" && exec sudo $0 "$@" +if [[ $(id -u) -ne 0 ]]; then echo "Please run as root"; exit 1; fi function msg() { echo ":: $1"