您的位置:首页 > 其它

How to add a user and set environments for the user?

2008-06-01 14:48 721 查看
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?
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,

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: