当前位置: 首页 > news >正文

做网站已经不行河南网站设计

做网站已经不行,河南网站设计,网站做盗版视频赚钱吗,在国外做网站推广/etc/skel目录 Linux中的/etc/skel目录(skel是skeleton的缩写,意为骨骼、框架。)是用来存放新用户配置文件的目录,当我们添加新用户时,这个目录下的所有文件会自动被复制到新添加的用户的家目录下;默认情况…

/etc/skel目录

  Linux中的/etc/skel目录(skel是skeleton的缩写,意为骨骼、框架。)是用来存放新用户配置文件的目录,当我们添加新用户时,这个目录下的所有文件会自动被复制到新添加的用户的家目录下;默认情况下,/etc/skel目录下的所有文件都是隐藏文件(以.点开头的文件);通过修改、添加、删除/etc/skel目录下的文件,我们可为新创建的用户提供统一、标准的、初始化用户环境。

 

演示:让每个新用户都可以看到hi.txt的文档

[root@w ~]# ll /etc/skel/ -al                            查看/etc/skel/下的文件
total 20
drwxr-xr-x.  2 root root 4096 Feb 23 14:39 .
drwxr-xr-x. 59 root root 4096 Apr 19 12:03 ..
-rw-r--r--.  1 root root   18 Jul 18  2013 .bash_logout
-rw-r--r--.  1 root root  176 Jul 18  2013 .bash_profile
-rw-r--r--.  1 root root  124 Jul 18  2013 .bashrc
[root@w ~]# cd /etc/skel/
[root@w skel]# ll                                        默认查看都是隐藏的
total 0
[root@w skel]# vi hi.txt                                 创建一个hi.txt的文件,写入hello
hello
[root@w skel]# ll
total 4
-rw-r--r--. 1 root root 6 Apr 21 11:22 hi.txt
[root@w skel]# useradd test1                             新建test1的用户
[root@w skel]# ll /home/test1/ -al                       查看test1的家目录
total 24
drwx------. 2 test1 test1 4096 Apr 21 11:23 .
drwxr-xr-x. 5 root  root  4096 Apr 21 11:23 ..
-rw-r--r--. 1 test1 test1   18 Jul 18  2013 .bash_logout
-rw-r--r--. 1 test1 test1  176 Jul 18  2013 .bash_profile
-rw-r--r--. 1 test1 test1  124 Jul 18  2013 .bashrc
-rw-r--r--. 1 test1 test1    6 Apr 21 11:22 hi.txt       看到刚才创建的hi.txt文件
[root@w skel]# cat /home/test1/hi.txt                    可以看到里面的hello内容
hello

模拟删除test1用户/etc/skel/目录下的文件后的恢复

删除:/etc/skel/下的文件
[root@w skel]# su - test1
[test1@w ~]$ ls -al
total 24
drwx------. 2 test1 test1 4096 Apr 21 11:23 .
drwxr-xr-x. 5 root  root  4096 Apr 21 11:23 ..
-rw-r--r--. 1 test1 test1   18 Jul 18  2013 .bash_logout
-rw-r--r--. 1 test1 test1  176 Jul 18  2013 .bash_profile
-rw-r--r--. 1 test1 test1  124 Jul 18  2013 .bashrc
-rw-r--r--. 1 test1 test1    6 Apr 21 11:22 hi.txt
[test1@w ~]$ rm -f *                               直接删除不管用
[test1@w ~]$ ls -al                                文件还在
total 20
drwx------. 2 test1 test1 4096 Apr 21 11:51 .
drwxr-xr-x. 5 root  root  4096 Apr 21 11:23 ..
-rw-r--r--. 1 test1 test1   18 Jul 18  2013 .bash_logout
-rw-r--r--. 1 test1 test1  176 Jul 18  2013 .bash_profile
-rw-r--r--. 1 test1 test1  124 Jul 18  2013 .bashrc
[test1@w ~]$ rm -f .*                              删除以.开头的文件
rm: cannot remove `.‘: Is a directory
rm: cannot remove `..‘: Is a directory
[test1@w ~]$ ls -al                                .bash等文件已删除
total 8
drwx------. 2 test1 test1 4096 Apr 21 11:52 .
drwxr-xr-x. 5 root  root  4096 Apr 21 11:23 ..
[test1@w ~]$ su - test1                            切换到test1用户
Password: 
-bash-4.1$                                         出现这种是因为/etc/skel/下的文件没了
-bash-4.1$ 
-bash-4.1$ logout恢复/etc/skel/文件
[root@w ~]# cd /etc/skel/                          切换到root,打开/etc/skel/目录
[root@w skel]# ls -al
total 24
drwxr-xr-x.  2 root root 4096 Apr 21 11:22 .
drwxr-xr-x. 59 root root 4096 Apr 21 11:50 ..
-rw-r--r--.  1 root root   18 Jul 18  2013 .bash_logout
-rw-r--r--.  1 root root  176 Jul 18  2013 .bash_profile
-rw-r--r--.  1 root root  124 Jul 18  2013 .bashrc
-rw-r--r--.  1 root root    6 Apr 21 11:22 hi.txt
[root@w skel]# cp -a .bash* /home/test1/           把所有.bash的文件复制到test1的家目录
[root@w skel]# ll /home/test1/ -al                 查看文件已存在
total 20
drwx------. 2 test1 test1 4096 Apr 21 11:59 .
drwxr-xr-x. 5 root  root  4096 Apr 21 11:23 ..
-rw-r--r--. 1 root  root    18 Jul 18  2013 .bash_logout        权限只属于root
-rw-r--r--. 1 root  root   176 Jul 18  2013 .bash_profile
-rw-r--r--. 1 root  root   124 Jul 18  2013 .bashrc
[root@w skel]# chown -R test1 /home/test1/         赋于test1用户权限,不赋权不能使用
[root@w skel]# ll /home/test1/ -al              
total 20
drwx------. 2 test1 test1 4096 Apr 21 11:59 .
drwxr-xr-x. 5 root  root  4096 Apr 21 11:23 ..
-rw-r--r--. 1 test1 root    18 Jul 18  2013 .bash_logout        权限赋给test1了
-rw-r--r--. 1 test1 root   176 Jul 18  2013 .bash_profile
-rw-r--r--. 1 test1 root   124 Jul 18  2013 .bashrc
[root@w skel]# su - test1                          切换到test1用户,已经可以了
[test1@w ~]$ 
[test1@w ~]$

转载于:https://www.cnblogs.com/davidshen/p/10213802.html

http://www.lbrq.cn/news/2798839.html

相关文章:

  • 做网站的三个软件seo网络培训学校
  • wordpress结合tornado成都优化官网公司
  • 开发网站需要怎么做网站一级域名和二级域名区别
  • 淘宝怎么才能发布网站建设重庆seo黄智
  • 东莞建设网站软件手机百度2020最新版
  • 垂直网站需要多少钱广东疫情防控措施
  • 网站建设公司推广百度投放广告一天多少钱
  • 三明企业网站建设山西seo排名
  • 最好的免费发布网站百度官网首页登陆
  • 丹东建设工程信息网站html简单网页设计作品
  • 网站建设在线推广推广代理公司
  • 投票网站设计百度官网app下载
  • 游戏网页代码西安百度seo
  • 宁波哪家公司做网站好百度云盘登录入口
  • 响应式网站是怎么做的seo的基本内容
  • 建站节沈阳黄页88企业名录
  • 西安做门户网站最好的公司运营推广
  • 珠海市住房城乡建设官网北京seo公司wyhseo
  • 成都app制作软件seo教程免费
  • 建设摩托车是名牌吗关键词优化到首页怎么做到的
  • 靠谱网站优化哪家好交换友链
  • 网页设计需求模板seo营销服务
  • 住房新建网站在线crm系统
  • 医院网站建设方案书360指数在线查询
  • wordpress做学校网站合肥网站排名推广
  • 我先做个网站怎么做的百度快速排名优化技术
  • 怎样制作微信网站优化设计答案五年级上册
  • 建站的步骤有哪些在线培训网站
  • 网站建设需要注意哪些百度优化教程
  • 微信显示wordpress南京seo外包
  • 交易高光时刻-01
  • vmware安装centos7
  • Advanced Math Math Analysis |02 Limits
  • 从YOLOv5到RKNN:零冲突转换YOLOv5模型至RK3588 NPU全指南
  • 微服务的编程测评系统13-我的竞赛列表-elasticSearch
  • 【网络运维】Shell:变量数值计算