Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm new to linux, and am taking a course that requires me to do the following:

  1. Creating a login name
  2. Establishing appropriate group(s)
  3. Creating the home directory
  4. Creating the login shell
  5. Establishing a pass word for the user
  6. Setting an appropriate PATH
  7. Placing appropriate files in the home directory

This is what I have done so far, but I'm not sure about my home directory and PATH...

[root@Server ~]# useradd -gusers -s/bin/shell -p1234 -d/home/group -m userid
[root@CentosStudentSvr ~]# usermod -m -d/homedir/ userid

What I should I do for my PATH?

share|improve this question
1  
This is homework, isn't it? –  Benjamin Bannier Jun 1 '13 at 17:32
add comment

1 Answer

I assume by 'PATH' you are referring to the environment variable $PATH.
If so, you would want to set and export in a configuration file.
This could be done in /etc/profile to affect all users, or in ~/.profile for an individual user.

You could add the following:

PATH=$PATH:/data/myscripts:/some/other/dir
export PATH

Where

  • $PATH preserves anything already set to the PATH.
  • : separates entries.
  • And the two directories are examples.

Note: this is a little bash biased, so It may be slightly different if you use another shell

share|improve this answer
    
He can also include ~/bin into the per-user config. That would comply with g) and is standard in some distros, too. –  mpy Jun 1 '13 at 16:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.