Linux 创建用户
以Fedora Core 6 为例:
#useradd username
#passwd passwd
允许username以ssh2方式登录:
#echo ‘AddUsers username’ >> /etc/ssh/sshd_config
#/etc/init.d/sshd restart
#echo ‘username ALL=(ALL) ALL’ >> /etc/sudoers
另外创建用户时也可以直接使用命令编辑相关文件:
#vipw 编辑/etc/passwd文件,在fc6中会要求编辑/etc/shadow文件。
#vigr 编辑/etc/group文件,在fc6中会要求编辑/etc/gshadow文件。