六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 101|回复: 0

How to add a user and set environments for the us

[复制链接]

升级  16.33%

75

主题

75

主题

75

主题

举人

Rank: 3Rank: 3

积分
249
 楼主| 发表于 2013-1-29 00:00:46 | 显示全部楼层 |阅读模式
1.         How to add a user and login with new user in Solaris?

#bash
#groupadd users
#useradd -d /export/home/robert -m -g users robert


Keep in root user


#passwd robert
#chown -R robert:users /export/home/robert 


Notes, you must change the ower of the home directory. Otherwise you can't login JDS correctly with this user.

You can add the user with smc, the command is /usr/sadm/bin/smc &
Please also refer to http://publish.it168.com/2007/0510/20070510002004.shtml
2.         How to set the environment variants for a user?<span style="font-size: 9pt; font-family: Arial;" />
1)         (In process level) Add the scripts of export into the start shell script.
2)         (In user level) Add the scripts of export into the .profile in user home directory.
3)         (In global level) Add the scripts of export into the /etc/profiie.

Note, please note that you must add the scripts of export into the specific file directory. Don't encapsulate them in a shell, and invoke the shell in profile. Because environment works inside its process or its child processes.

3.         References,<span style="font-size: 9pt; font-family: Arial;" />

http://bbs.chinaunix.net/archiver/?tid-1034081.html
http://topic.csdn.net/t/20061120/10/5170346.html
http://blog.csdn.net/hotsolaris/archive/2008/05/14/2443685.aspx
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表