diff --git a/shadow-4.5-goodname.patch b/shadow-4.5-goodname.patch
index 215f6580604ca7ddb6fbfd28fc466ab11e428760..b107e3f254d61026a5e6593f7b3f76d39b041d9a 100644
--- a/shadow-4.5-goodname.patch
+++ b/shadow-4.5-goodname.patch
@@ -64,7 +64,7 @@ Index: shadow-4.5/man/groupadd.8.xml
===================================================================
--- shadow-4.5.orig/man/groupadd.8.xml
+++ shadow-4.5/man/groupadd.8.xml
-@@ -256,12 +256,6 @@
+@@ -256,10 +256,12 @@
CAVEATS
@@ -72,16 +72,20 @@ Index: shadow-4.5/man/groupadd.8.xml
- followed by lower case letters, digits, underscores, or dashes.
- They can end with a dollar sign.
- In regular expression terms: [a-z_][a-z0-9_-]*[$]?
--
--
- Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long.
++ Groupnames may contain only lower and upper case letters, digits,
++ underscores, or dashes. They can end with a dollar sign.
++
++ Dashes are not allowed at the beginning of the groupname.
++ Fully numeric groupnames and groupnames . or .. are
++ also disallowed.
+ Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long.
Index: shadow-4.5/man/useradd.8.xml
===================================================================
--- shadow-4.5.orig/man/useradd.8.xml
+++ shadow-4.5/man/useradd.8.xml
-@@ -633,12 +633,6 @@
+@@ -633,10 +633,14 @@
@@ -89,8 +93,14 @@ Index: shadow-4.5/man/useradd.8.xml
- followed by lower case letters, digits, underscores, or dashes.
- They can end with a dollar sign.
- In regular expression terms: [a-z_][a-z0-9_-]*[$]?
--
--
- Usernames may only be up to 32 characters long.
++ Usernames may contain only lower and upper case letters, digits,
++ underscores, or dashes. They can end with a dollar sign.
++
++ Dashes are not allowed at the beginning of the username.
++ Fully numeric usernames and usernames . or .. are
++ also disallowed. It is not recommended to use usernames beginning
++ with . character as their home directories will be hidden in
++ the ls output.
-
+
+ Usernames may only be up to 32 characters long.
diff --git a/shadow.spec b/shadow.spec
index 6b617cb323141615e60cc3d29fe7cc33c082d8f7..3f88551840592b3d48b69a4c340f4c7e362fd31e 100644
--- a/shadow.spec
+++ b/shadow.spec
@@ -1,6 +1,6 @@
Name: shadow
Version: 4.7
-Release: 6
+Release: 7
Epoch: 2
License: BSD and GPLv2+
Summary: Tools for managing accounts and shadow password files
@@ -13,6 +13,7 @@ Source4: shadow-bsd.txt
Source5: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
# fix unknown item 'LASTLOG_MAX_UID'
Patch1: usermod.c-Fix-invalid-variable-name.patch
+Patch2: shadow-4.5-goodname.patch
Patch9000: shadow-4.1.5.1-var-lock.patch
Patch9001: shadow-utils-fix-lock-file-residue.patch
Patch9002: shadow-utils-fix-invalid-path.patch
@@ -164,6 +165,9 @@ done
%{_mandir}/*/*
%changelog
+* Thu Feb 6 2020 openEuler Buildteam - 2:4.7-7
+- User name can start with an upper case letter
+
* Sat Jan 18 2020 openEuler Buildteam - 2:4.7-6
- Delete ALWAYS_SET_PATH, which has been set by security-tool