System Administration basics

System administration is not my strong point. However, today I had to create some users and groups on a Redhat Linux box that serves websites for Bluewall. I was lucky to find a helpful tutorial, however, when I tried to run the commands as it describes, I ran into this problem:

[root@www httpdocs]# groupadd devteam
bash: groupadd: command not found

Command not found? How could that be? I asked my friend Chris Clarke about this, as he knows more about sysadmin that I do. He wrote back:

Try ‘/usr/sbin/useradd’

If that doesn’t work: ‘updatedb’ then ‘locate *useradd’

His first suggestion was what I needed. This worked perfectly:

[root@www httpdocs]# /usr/sbin/groupadd devteam

2 Responses to “System Administration basics”

  1. afriend Says:

    You must have used su command and not ‘su -l‘, which exports root PATH. Anyway using full path is a good idea. Try su -l next time.

  2. lawrence Says:

    Thanks for the tip. By the way, I just learned that in bash “cp” is an alias for “cp -i”. I mention this for anyone who comes to this page looking for basic sysadmin info. I needed to copy an entire website from its development directory to its live directory. This did not work:

    cp -fr /home/httpd/vhosts/ilevault.com/httpdocs/ /home/httpd/vhosts/ihanuman.com/

    This command ran in interactive mode and wanted to ask me if I meant to overwrite files on the live site. It was ready to ask me of this for every file, and we are talking about thousands of files. I had to cancel out of it. The “-f” flag had no effect.

    This did work:

    \cp -fr /home/httpd/vhosts/ilevault.com/httpdocs/ /home/httpd/vhosts/ihanuman.com/

    That backslash apparently causes the real “cp” command to be called, and not an alias.

Leave a Reply