Quote:
Originally Posted by grahamb314
When I login I see this:
-bash-4.1$
usually is is username@server$
I was moving my home directory and deleted it but I remade it with mkdir however there were probably some hidden files I deleted inside the folder?
How can I solve this and related issues I may see?
|
Create a folder in /home directory for user. here i take an example of user Harry
As superuser do:
1.Create a folder for user harry
Code:
# mkdir -p /home/Harry
2.create .bashrc_profile and .bashrc files in /home/Harry
Code:
# cat .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
PATH=$PATH:$HOME/bin
export PATH
Code:
# cat .bashrc
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
3. Set owner and group of directory
Code:
# chown -R harry:harry /home/Harry
4.Assign newly created directory to Harry
Code:
# usermod -m -d /home/Harry harry
You are done.