$ su - weblogic
$ sudo useradd weblogic -s /bin/bash -m -d /home/weblogic -c "weblogic user"
1. create a user nemed weblogic and meanwhile a new group will be created, named weblogic also. User weblogic belongs to group weblogic.
2. -s /bin/bash. Set login default shell to /bin/bash
3. -m. Create home folder if it does not exist.
4. -d /home/weblogic. Create home directory of weblogic.
Set password for this new user.
$ passwd weblogic
Now you can try to login with this user
$ su - weblogic
Create a new user,布布扣,bubuko.com
原文:http://blog.csdn.net/neuandustbneo/article/details/21959597