Re: [WBEL-users] No chkconfig or ifconfig commands?
Jamey Fletcher <[email protected]>
| Newsgroups | gmane.linux.whitebox.user |
|---|---|
| Message-ID | <[email protected]> |
Terry Henderson wrote: > On 7/1/06, Johnny Hughes <[email protected]> wrote: >> On Fri, 2006-06-30 at 17:59 -0500, Jeffery Mathis wrote: >> > I am trying to configure a DNS server using WBEL, but when I run the >> > chkconfig or ifconfig commands, I get "command not found". I'm new to >> > WBEL, but I do have prior experience with Red Hat and CentOS. What is >> > going on here? Does WBEL use different commands or something? >> Maybe you did not login with root in a way that gives you full >> environment variables. >> Normally, administration is done as the root user and not another user, >> and you can get to be root in a couple ways. >> The most common is to open a terminal and use the su (switch users) >> command. When using "su", you need to use a "-" with the command to get >> all the user's environment variables (including the PATH): >> so to become "root" with all variables set .... >> su - >> OR >> su - root >> If you use su by itself without the the "-" {ie, "su" or "su root"} you >> will have root privileges but will stay in your current directory and >> not have all environment variables (like root's PATH). > Another sonetimes handy option: > "su -m" affords full environment variables, (like root's PATH), but > will leave you in current directory. The trick is to know just what those switches do. su without a switch (just the name of the user being switched to, defaults to root if not specified) does *nothing* but change the effective user ID and create a new shell session, I'm guessing with the same shell the user was using before. su with the -m switch (see above about user name) preserves the *PREVIOUS* environment you had - and is actually the default action, normally. su with just a dash (see above about user name) starts up a login session for that user, so .profile, .bashrc, .bash_profile, etc. all get run [assuming bash is the root user's shell]. I believe that if root has a different shell as its default login shell, say ash or busybox, then that is what shell would come up. This stuff can be tricky, and it's got a lot of years of bullshit crap piled up as cruft, so you have to watch out. A lot of documentation out there tells you to add parameters to the X command in the startx script on your system - but startx hasn't *BEEN* a script in quite some time now.