Sometime when you are already like shell environment like BASH (Bourne Again SHell), you will have problem on some old shell like csh, ksh, or even sh. In this section I will show you how to create a user and their user environment using BASH. I will use Solaris 8 as example since Solaris 8 doesnt give you BASH as your default environment.
As root , create a normal user with this command, here I will use Jackie as example
useradd -d /export/home/jackie -m -s /usr/bin/bash -c "Jackie" jackie passwd jackie
then on the /export/home/jackie/.profile add this 2 lines:
PS1="[\u@h \w]\$"
export PS1
save it. Then let the user log in using their jackie and his new password.
He will see the environment like this:
[jackie@myserver jackie]$
try to logout and login again if the result is not like expected.
Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts
Friday, September 14, 2007
Create PS1 in Solaris 8
Posted by
No One
at
2:44 AM
0
comments
Labels: bash, programming, PS1, shell, Solaris
Subscribe to:
Posts (Atom)