hi

I have apache2 in suse10. everything went smooth. now when im adding a user using useradd command it creates the user but i cant find it under /home directory.

do you knw where it is or would i be able to make changes to .conf file in order to get it under /home directory?

thanx

Useradd could have been used to create the home path and populate the file
from /etc/skel etc.. but here's how you fix it. (as root, in bash)
Regular users should only have home areas. apache (httpd) and some others
do not however they may be run as a non-root level user to prevent compromise.
Variables are usually set in config files instead. e.g., /etc/httpd/httpd.conf

If the machine isn't a NIS slave; meaning homes are pulled from a home server.
/home IS local or an NFS share that root can add to.
df -k /home will reveal if the filesystem is local or NIS. If NIS then will show as
auto_home typically or you can use the following command to examine /etc/vfstab:
cat /etc/vfstab | grep home and see if its nfs.

1)change the default path in /etc/passwd for the new user to /home/userid
or whatever the userid is [use vi or your favorite editor]

2) create the users home directory and
setup permissions. (dont chown anything just yet..)
a) mkdir /home/userid (or whatever)
b) chmod 750 /home/userid

3) copy the template files to the users home directory and recursively change ownership.
a) cp /etc/skel/* /home/userid/
b) chown -r userid:groupid /home/userid

4) set a password for the user and activate the account
a) passwd userid
b) enter the new password twice when prompted.

5) attempt to telnet to the machine as the new user.
(you can even do this from a windows command prompt.)
a) telnet machinename domainname
b) enter login: and password: when prompted.


enjoy..

hi

thanx for the reply.

what is this groupid. I tried to put the same name in httpd.conf but says bad groupid.

also i did this df -k /home under filesystem i get this /dev/hda2, i think that is because i have done partition.

tanx

uid is owner.
gid or groupid is group
each user is in a group. controlled by /etc/group file.
id -a userid shows what a users groups (and default groups are)
file permissions are type/user/group/world
like: -rwxr-x---
ls -lap shows that stuff for files directories and links.

use the 'man' command to learn more about various commands, services and (sometimes) config files like so:
man ls
man chmod
man chown
man set
man httpd
man httpd.conf

remember. use the 'q' key to wuit a section and <space> bar to page down. when using man..

hi

thanx agian

everything is done except it doesnt ask for any password. waht should i do?

clarify: httpd doesnt?
it shouldnt if you start the script as root youre god. no password required
it forces process ownership as the user.

try to ssh to localhost or telnet from another box to test the password.

dont forget to check to make sure that apache starts automagically on reboot
like so:
'chkconfig --list | grep httpd'
'chkconfig httpd on' if it isnt

sorry i think you did not get me.

i mean when i write the command chown -r userid:groupid /home/userid it doesnt ask for password to be entered.

chown, chmod, df, vi, etc.. shouldn't require a password.
you're already on a console or in an active tty
session and have been authenticated.
Commands like ssh ftp, sftp, rsh & telnet require authentication using authentication.
You could also just log out of the box and attempt to login as the new user to test it.
After simply log out and log back in as root user.

Like I said before: Hit the man pages. Meaning type 'man commandname'to see what a particular command does.

AS for: /dev/hda2 turning out from the df -k command
youre a non-NIS machine and are good to go.

thanx really apreciate ur help. Everthing is done now. :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.