-
مشکل با su - postgresql
سلام میتونید یکم در این رابطه بهم کمک کنید ، یکم توضیح بدین :
su - postgres
-bash-3.2$ createuser -P sara
(این -P چیه ؟)
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) y
Password:
Password:
createuser: could not connect to database postgres: FATAL: password authentication failed for user "postgres"
(این اروره برای چیه؟ )
ممنون
-
ببینید وقتی همه را no هم میزنم بازم این password از من میخواد . این چه پسوردیه؟ من تو محیط تستی دارم کار میکنم و همه ی پسورد هام رو 123456 گذاشتم ، یعنی اگر چیزی هم باشه که بگم احتمالا پسوردی بوده که یادم رفته ، بازم همین 123456 باید باشه، ولی قبول نمیکنه و اون ارروره خط بعد رو میده .
اصلا چرا قبلا این مشکل رو نداشت ؟ میخواستم یه یوزر بسازم انقدر اذیت نمیکرد !
su - postgres
-bash-3.2$ createuser -P aaa
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
Password:
createuser: could not connect to database postgres: FATAL: password authentication failed for user "postgres"
-bash-3.2$
-
این این -p برای چیه که قاعدتا برای اینه که شما قصد ست کردن پسورد برای کاربر رو هم دارید .
-[QUOTE]P
--pwprompt If given, createuser will issue a prompt for the password of the new user. This is not necessary if you do not plan on using password authentication.
[/QUOTE]
در مورد پیامی که میده اگر خروجی خاصی در فایل /var/log/syslog یا لاگ خود postgres هست اینجا بزارید .
ضمن این که روندی که نشون میده شما به نقش کاربر postgres وارد میشید و کاربر میسازید . پسورد این کاربر هم 123456 هست ؟
-
سلام
متوجه شدم مشکل از چیه .
در مسیره /var/lib/pgsqldatapg_hba.conf که رفتم ، تنظیمات رو به این صورت انجام دادم و الان دیگه وقتی یوزر میسازم بعدش دیگه پسورده دیگه ای نمیخواد:
# "local" is for Unix domain socket connections only
local all all ident sameuser
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 ident sameuser