How to add a user and set environments for the us

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

你可能感兴趣的:(user,职场,add,休闲)