Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #228 from hypriot/set-default-bash
Browse files Browse the repository at this point in the history
Set useradd default shell to bash
  • Loading branch information
StefanScherer authored Mar 25, 2018
2 parents 1deeca3 + 554cfdd commit 3b67bd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions builder/chroot-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ proc /proc proc defaults 0 0
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
" > /etc/fstab

# Fix default shell for new users created with useradd
sed -i 's,SHELL=/bin/sh,SHELL=/bin/bash,' /etc/default/useradd

# as the Pi does not have a hardware clock we need a fake one
apt-get install -y \
--no-install-recommends \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@
it { should be_mode 644 }
it { should be_owned_by 'pirate' }
end

describe file('/etc/default/useradd') do
it { should be_file }
it { should be_owned_by 'root' }
its(:content) { should contain /SHELL=\/bin\/bash/ }
end

0 comments on commit 3b67bd8

Please sign in to comment.