Skip to content

Commit 1f19c27

Browse files
taoyl-mslguohan
authored andcommitted
Modify sudo lecture message to be more informational (#1800)
1 parent 502ba0e commit 1f19c27

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

files/build_templates/sonic_debian_extension.j2

+1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ sudo cp $IMAGE_CONFIGS/asn/deployment_id_asn_map.yml $FILESYSTEM_ROOT/etc/sonic/
184184

185185
# Copy sudoers configuration file
186186
sudo cp $IMAGE_CONFIGS/sudoers/sudoers $FILESYSTEM_ROOT/etc/
187+
sudo cp $IMAGE_CONFIGS/sudoers/sudoers.lecture $FILESYSTEM_ROOT/etc/
187188

188189
# Copy control plane ACL management daemon files
189190
sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd.service $FILESYSTEM_ROOT/etc/systemd/system/

files/image_config/sudoers/sudoers

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Defaults env_reset
1010
#Defaults mail_badpass
1111
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
1212
Defaults env_keep += "VTYSH_PAGER"
13+
Defaults lecture_file = /etc/sudoers.lecture
1314

1415
# Host alias specification
1516

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
Make sure your account has RW permission to current device.
3+
Otherwise sudo requests will be rejected.
4+

0 commit comments

Comments
 (0)