免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 6867 | 回复: 16
打印 上一主题 下一主题

[新手入门] 请大虾们指教 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-11 14:43 |只看该作者 |倒序浏览
20可用积分
请问各位大侠们,受领导指示,想在机器系统中加入公司的一些信息,如公司网址、联系方式等等加入到系统中,在开机引导过程中或者终端状态下能看到啊?请给个详细的解决办法。谢谢了。

最佳答案

查看完整内容

晕http://www.yesadmin.com/411/155542/index.html另外9楼兄弟提到的文件权限是444,你修改前修改下权限或者vi保存的时候 wq! 都可以啊

论坛徽章:
0
2 [报告]
发表于 2010-01-11 14:43 |只看该作者
原帖由 xinshouzhe 于 2010-1-12 16:05 发表
# shutdown -r

SHUTDOWN PROGRAM
Tue Jan 12 15:38:55 CST 2010


Broadcast message from root@44p170 (tty) at 15:38:55 ...

shutdown: PLEASE LOG OFF NOW !!!
All processes will be killed in  ...





http://www.yesadmin.com/411/155542/index.html

另外9楼兄弟提到的文件权限是444,你修改前修改下权限或者vi保存的时候 wq! 都可以啊

论坛徽章:
0
3 [报告]
发表于 2010-01-11 15:09 |只看该作者
方法太多了,比较笨的办法:

开机能看到的话写个shell ,启动的时候通过/etc/inittab执行一下,同理登陆shell在环境变量里执行一下就ok

论坛徽章:
0
4 [报告]
发表于 2010-01-11 15:21 |只看该作者
另外就是 /etc/security/login.cfg 里边的herald参数



* herald        Specifies the initial message to be printed out when getty or
*               login prompts for a login name.  This value is a string that is
*               written out to the login port.  If the herald is not specified
*               for a port or in the default stanza, then the default herald is
*               gotten from the message catalog associated with the language
*               set in /etc/environment.

论坛徽章:
0
5 [报告]
发表于 2010-01-11 15:21 |只看该作者
兄弟,给做个详细的例子看看吧,没搞过啊。

论坛徽章:
0
6 [报告]
发表于 2010-01-11 15:24 |只看该作者
原帖由 xinshouzhe 于 2010-1-11 15:21 发表
兄弟,给做个详细的例子看看吧,没搞过啊。



那你用第二个吧

herald = "你们公司信息  \n 换行 "

论坛徽章:
0
7 [报告]
发表于 2010-01-11 16:50 |只看该作者
# vi /etc/security/login.cfg

[Using open mode]
"/etc/security/login.cfg" 173 lines, 5541 characters
*******************************************************************************
*
* Valid port attributes:
*
* herald=  xxxxxxxxxxxxxxxxxxxxxxxxx Co.,Ltd           \2
*
    Mob:13xxxxxxxxxxxxx           Telxxxxxxxxxx \3

   MSNxxxx@msn.com            QQ: xxxxxxxxxxxxx

Specifie
s the initial message to be printed out when getty or


*               login prompts for a login name.  This value is a string that is
*               written out to the login port.  If the herald is not specified
*               for a port or in the default stanza, then the default herald is
*               gotten from the message catalog associated with the language
*               set in /etc/environment.
*---------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
* :wq

# cat /etc/security/login.cfg
*******************************************************************************
*
* Valid port attributes:
*
* herald= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Co.,Ltd           \2


   Mobxxxxxxxxxxxxxxxxxxxx           Telxxxxxxxxxxxxxxxxxxx \3
   MSNxxxxxxxxxxxx@msn.com        QQxxxxxxxxxxxxxxxxxx


------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
兄弟,重启之后没有任何关于公司信息的输出啊。哪里还有问题,给指正一下吧。

[ 本帖最后由 xinshouzhe 于 2010-1-11 17:01 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2010-01-11 16:54 |只看该作者


全角半角

论坛徽章:
0
9 [报告]
发表于 2010-01-11 16:58 |只看该作者
grep ^[^*] /etc/security/login.cfg

结果贴出来

论坛徽章:
0
10 [报告]
发表于 2010-01-11 17:48 |只看该作者
还是添加信息到/etc/motd吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP