首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
Distributions
›
Ubuntu
›
Fedora
›
CentOS
中文资源站
›
网易开源镜像站
V2EX
›
Linux
关于执行 su - user -c command 的问题。老提示 No passwd entry for user 'user'
cevincheung
·
cevin
·
2014-04-29 13:52:05 +08:00
· 14562 次点击
这是一个创建于 3797 天前的主题,其中的信息可能已经有所发展或是发生改变。
我执行postgresql。
su - pgsql -c "postmaster -D /opt/pgsqldata" >> /opt/pgsqldata/serverlog 2>&1 &
提示pgsql没有密码。给pgsql设置了密码。执行su让输入密码。
怎么在su命令中直接给密码?要不开机无法自动启动啊
su
user
pgsql
4 条回复
•
2014-04-29 20:41:44 +08:00
1
davepkxxx
2014-04-29 15:30:38 +08:00
sudo
2
davepkxxx
2014-04-29 15:31:13 +08:00
export
3
cevincheung
OP
2014-04-29 19:28:03 +08:00
@
davepkxxx
解决了 。ubuntu server下,必须切换到root用户执行。sudo也不行。
4
kxxoling
2014-04-29 20:41:44 +08:00
切换到 postgres 用户应该也是可以的。
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
1299 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 22ms ·
UTC 23:58
·
PVG 07:58
·
LAX 16:58
·
JFK 19:58
Developed with
CodeLauncher
♥ Do have faith in what you're doing.