Skip to content

Commit

Permalink
Modify sudo lecture message to be more informational (#1800)
Browse files Browse the repository at this point in the history
  • Loading branch information
taoyl-ms authored and lguohan committed Jun 21, 2018
1 parent 7557007 commit b745c0b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ sudo cp $IMAGE_CONFIGS/asn/deployment_id_asn_map.yml $FILESYSTEM_ROOT/etc/sonic/

# Copy sudoers configuration file
sudo cp $IMAGE_CONFIGS/sudoers/sudoers $FILESYSTEM_ROOT/etc/
sudo cp $IMAGE_CONFIGS/sudoers/sudoers.lecture $FILESYSTEM_ROOT/etc/

# Copy control plane ACL management daemon files
sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd.service $FILESYSTEM_ROOT/etc/systemd/system/
Expand Down
1 change: 1 addition & 0 deletions files/image_config/sudoers/sudoers
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Defaults env_reset
#Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Defaults env_keep += "VTYSH_PAGER"
Defaults lecture_file = /etc/sudoers.lecture

# Host alias specification

Expand Down
4 changes: 4 additions & 0 deletions files/image_config/sudoers/sudoers.lecture
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

Make sure your account has RW permission to current device.
Otherwise sudo requests will be rejected.

0 comments on commit b745c0b

Please sign in to comment.