要给研发人员服务器的连接账号查看日志,又担心不熟悉服务器操作的研发人员把服务器搞乱。
比较妥帖的方法首选添加只有一定权限的登录账号了。
1、添加新账号 xuxd

useradd xuxd

2、给新账号设置密码

passwd xuxd 

3、添加用户到web组

usermod -g web xuxd

4、修改开机启动配置文件的所有者

chown root. /home/xuxd/.bash_profile

5、设置配置文件权限

 chmod 755 /home/dev/.bash_profile

6、添加必要的命令

ln -s /usr/bin/wc /home/xuxd/.bin/wc
ln -s /usr/bin/less /home/xuxd/.bin/less
ln -s /usr/bin/ls /home/xuxd/.bin/ls
ln -s /usr/bin/pwd /home/xuxd/.bin/pwd
ln -s /usr/bin/find /home/xuxd/.bin/find
ln -s /usr/bin/grep /home/xuxd/.bin/grep
ln -s /usr/bin/cat /home/xuxd/.bin/cat
ln -s /usr/bin/more /home/xuxd/.bin/more
ln -s /usr/bin/tail /home/xuxd/.bin/tail

标签: none

添加新评论