Date: Tue, 6 Oct 1998 14:43:48 -0400 (EDT) From: "Woodchuck" <djv@bedford.net> To: Ghulam_Dastgir@uk.ibm.com (Ghulum Dastgir) Cc: freebsd-questions@FreeBSD.ORG Subject: Re: new users and headaches Message-ID: <199810061843.OAA20383@castor.chuck> In-Reply-To: <5060100024178032000002L022*@MHS> from Ghulum Dastgir at "Oct 4, 98 10:13:46 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Ghulum Dastgir wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > hi, > > after adding a new user I see that there is nothing in the new user's home > directory. So when I try starting X windows (as the new user) with startx/xinit > it says command not found (X already works as root). > Given that i have nothing in the new user's home directory does this probably > explain why I can't start X? I thought that using adduser automatically copied > over the basic, already installed utilities from root to the new user. But this [Try formatting email to 72 columns. This will be more natural if you compose it in a standard width window.] > does not appear to be the case. > Why? As already pointed out, this appears to be a problem with the user's PATH variable. If you added the user with adduser (a Perl script), the user's HOME would be populated with a small collection of default 'rc' (startup) files, whose names start with "." . These are copied in from /usr/share/skel. ls will display names starting with a "." if you are root, by default. For other users, using the -a ("all") switch will show them. You should see .profile, .login, .cshrc and other such beasties. > So do I now have to go about copying everything that i use in root to the new > user? This would include X, emacs, gcc etc in my case. Unix is a multiuser design, so there is no need for executables to appear in the user's HOME directory tree. [They are shared from common locations, in other words.] In normal operation each user has almost the same view of the file hierarchy. (Some mainframe OSes may present a different view of things). > Also when i echo $PATH as this new user i get /usr/bin:/bin. Does this also > explain things. Yes. A reasonable PATH for an unprivileged user might be: /bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:$HOME/bin Some would suggest adding a ":" to the end of that, which would include the current working directory in the PATH, but others say "No, this is a security problem". [you might execute a wrong program, placed in a directory by a vicious or perhaps prudent person]. If the user will also be doing admin work, you may wish to add /sbin:/usr/sbin:/usr/local/sbin to the PATH. There is no harm in doing this for a non-admin user, but it is usually not done, because progs in those dir's are not 'of interest' to such users. (Of course anyone may execute such programs by mentioning the whole path to the executable, as in:) /sbin/ping foo.bar.baz Since the PATH is searched in order, there are religious viewpoints about whether /bin should be searched before or after /usr/bin, and so on. Suit yourself. If you include the current directory, it should probably be last. Some say first. *sigh* ------------ Some aspects of your post suggest that you are new to UNIX. I would recommend that you bone up a little: Linkname: Resources GEEK-GIRL provides URL: http://www.geek-girl.com/resources.html Yeah, there's a girl there, and she's a geek. She has a very nice collection of UNIX (not just BSD) related links and materials. If you prefer printed material, www.ora.com (O'Reilly Associates) probably publishes the most consistently recommended books on practical UNIX subjects, ranging from newbie needs to advanced treatises. Their books are available world-wide. If you stumble across some Linux material, don't ignore it. Most things look nearly the same from a user's standpoint. Don't believe anything they say about the kernel, though. Dave -- Will hack for cabbages! Every day is Groundhog Day! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810061843.OAA20383>