[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Site paths
On Sat, Feb 26, 2000 at 08:09:10PM -0800, victoria.tc.ca wrote:
: When a user on the system is using telnet and cd..'s down past their home
: dir, how does the user know what site they are in? How would they know if
: they belong to site1, site2, site3 and so on........
Bash sets quite a few variables, at a shell prompt type:
[mkovach mkovach]$ set
BASH=/bin/bash
BASH_VERSION=1.14.7(1)
COLUMNS=80
EUID=111
HISTFILE=/home/sites/home/users/mkovach/.bash_history
HISTFILESIZE=0
HISTSIZE=1000
HOME=/home/sites/home/users/mkovach
HOSTNAME=cobalt.alal.com
HOSTTYPE=mips
IFS=
LINES=24
LOGNAME=mkovach
MAIL=/var/spool/mail/mkovach
MAILCHECK=60
OPTERR=1
OPTIND=1
OSTYPE=Linux
PATH=/usr/bin:/bin:/usr/bin:/usr/X11R6/bin
PPID=18834
PS1=[\u \W]\$
PS2=>
PS4=+
PWD=/home/sites/home/users/mkovach
SHELL=/bin/bash
SHLVL=1
SSH_CLIENT=207.166.197.251 767 22
SSH_TTY=/dev/ttyp1
TERM=xterm
UID=111
USER=mkovach
_=set
[mkovach mkovach]$ echo $HOME
/home/sites/home/users/mkovach
: I guess they could just user the cd command to go back to their home dir and
: the pwd command to get the system path for configuring CGI and Perl scripts,
: but their must be an easier way to do this. Maybe perhaps naming the HOME
: dir the same as the username?? or is this done to restrict hackers from
: getting usernames?? But on the otherside if it was a hacker that knew a bit
: about the Unix O/S they would know that the users names are in the password
: file, and httpd.conf file, log files, and the list goes on and on.
If the really want to know that site they are in, create a script for them,
something like:
#!/bin/bash
SITE=$(echo $HOME|sed -e s:/ho.*es/::g -e s:/u.*::g)
echo "$USER, you are part of site: $SITE"
echo "Your home directory is $HOME"
echo "Your personal website is at /home/sites/$SITE/users/$USER/web"
echo "Your main site is at /home/sites/$SITE/web"
exit 0
and put it in /usr/local/bin so people can use it.
: Is their a way to change the user creation process to create the user dirs
: with the same name as the user name? This is the first time I have seen this
: type of setup on a Unix system and I think it is an unnecessary step in the
: user creation process. Anyone have any sudjustions, I would like to here
: them.
Everybody's home directory is there username, with /home/sites/siteXX/users...
Basically the structure is:
/home/sites - home for everybody
/sitexx - specific area for a particular site
/users - specific area for users of that site
/web - specific area for main web site
I've done much sickier and twisted things.
--
Mat Kovach mkovach@xxxxxxxxxxxxxxxxx
Cleveland Linux User Group http://cleveland.lug.net