centos-ssh
centos-ssh copied to clipboard
SSH_USER variable not working
@Pavo-IM This is expected; the value used for SSH_USER didn’t validate. Try without an uppercase character.
Ref: https://github.com/jdeathe/centos-ssh/blob/378c503b1b240609e8a9d012e3ec74f5f5998e40/src/usr/sbin/sshd-bootstrap#L744
@Pavo-IM This is expected; the value used for SSH_USER didn’t validate. Try without an uppercase character.
Ref:
https://github.com/jdeathe/centos-ssh/blob/378c503b1b240609e8a9d012e3ec74f5f5998e40/src/usr/sbin/sshd-bootstrap#L744
Works, thanks but is there anyway to add upper and lower case username support?
@Pavo-IM This validation was based on the following standards based validation routine:
Ref: https://github.com/shadow-maint/shadow/blob/4.6/man/useradd.8.xml#L639-L661
However, looking into the source of the shadow rpm for CentOS 7 the user name validation is less restrictive by way of a patch to is_valid_name
.
Ref: https://git.centos.org/rpms/shadow-utils/blob/c7/f/SOURCES/shadow-4.5-goodname.patch#_16-23
[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?