发布网友
共3个回答
热心网友
ubuntu 修改终端 提示符中的用户名方法:
修改/etc/profile文件为:
if [ "$PS1" ]; then
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ ' ,下面是添加的
export PS1='[/u@/h /W/]/$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
然后,让其生效:
source /etc/profile
热心网友
首先,你是root的权限么,shadow只能root改。
也可能你权限设置不对,要么你用root修改shadow的权限,然后编辑,然后改回来。
其实你想改密码直接用passwd就可以了。不需要编辑shadow的。
passwd 用户名 就好了
当然也有可能你根本没有启动shadow,而是把密码保存在passwd里。不过想来应该不会犯这种错误。
如果你不是root,你想修改自己的密码,直接passwd就好了。。
实在不行我帮你改吧。。呵呵。。
热心网友
系统管理-用户和组,在打开的窗口看看就知道了