如果以上配置不能成功,那么可以添加一个新用户如 leaf 用户名
leaf# adduser #添加命令 Username: leaf #添加用户leaf Full name: #默认为空,回车 Uid (Leave empty for default): #默认为空,回车 Login group [leaf]: wheel #填写wheel 组 Login group is wheel. Invite leaf into other groups? []: wheel #填写wheel 组 Login class [default]: #默认为空,回车 Shell (sh csh tcsh bash rbash nologin) [sh]: csh #这里要选择填写 csh 回车 Home directory [/home/leaf]: #默认为空,回车 Home directory permissions (Leave empty for default): #默认为空,回车 Use password-based authentication? [yes]: #默认为空,回车 Use an empty password? (yes/no) [no]: #默认为空,回车 Use a random password? (yes/no) [no]: no 屡#输入no,回车 Enter password: #输入密码 Enter password again: #重复输入密码 Lock out the account after creation? [no]: #默认为空,回车 Username : leaf Password : <blank> Full Name : Uid : 1009 Class : Groups : wheel wheel Home : /home/leaf Home Mode : Shell : /bin/csh Locked : no OK? (yes/no): yes #输入yes 结束,回车 adduser: INFO: Successfully added (leaf) to the user database. Add another user? (yes/no): no #选择不再添加用户,回车 Goodbye!
好了经过以上添加配置,登陆的用户就可以自动使用命令补全功能了!!!
需要删除用户可执行
rmuser <用户名>
如:
leaf# rmuser leaf #删除leaf用户操作 Matching password entry: leaf:*:1001:0::0:0:User &:/home/leaf:/bin/sh Is this the entry you wish to remove? yes #输入 yes ,回车 Remove user's home directory (/home/leaf)? yes #输入 yes ,回车 Removing user (leaf): mailspool home passwd.Leave a Comment