Error when add shard to cluster with mongos

[root@rmd-mongo-router log]# mongos --config /etc/mongos.conf
about to fork child process, waiting until server is ready for connections.
forked process: 13495
child process started successfully, parent exiting
[root@rmd-mongo-router log]# mongosh --host rmd-mongo-router --port 27017
Current Mongosh Log ID: 62ebad3dbeeef40c419a983f
Connecting to: mongodb://rmd-mongo-router:27017/?directConnection=true&appName=mongosh+1.5.4
Using MongoDB: 6.0.0
Using Mongosh: 1.5.4

For mongosh info see: https://docs.mongodb.com/mongodb-shell/

[direct: mongos] test> admin = db.getSiblingDB(“admin”)
admin
[direct: mongos] test> db.getSiblingDB(“admin”).createUser(
… {
… user: “adminreal”,
… pwd: “mongo_4U”,
… roles: [ { role: “userAdminAnyDatabase”, db: “admin” } ]
… }
… )
MongoServerError: command createUser requires authentication
[direct: mongos] test> sh.addShard( “shardreplica01/rmd-mongo-shared-01:27017”)
MongoServerError: command addShard requires authentication

How can i create user on mongos server to add shard to sharded cluster ? how can i resolve this problem ?

Thank you

mongos uses the data from config servers
You have to create the user on config server