Skip to content

Instantly share code, notes, and snippets.

@bsnux
Created October 27, 2021 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsnux/9e69cb9952c51638dacc15f0949a454a to your computer and use it in GitHub Desktop.
Save bsnux/9e69cb9952c51638dacc15f0949a454a to your computer and use it in GitHub Desktop.
How to modify shell when auth is done by LDAP
#!/bin/bash
#
# Set zsh as default shell when auth is done by LDAP
#
set -eou pipefail
getent passwd afernandez | perl -pne 's/bash/zsh/' | sudo tee -a /etc/passwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment