> At 9:24 PM -0500 5/20/02, ABrady wrote: > >On Mon, 20 May 2002 18:38:55 -0700 > >Patrick Beart <[EMAIL PROTECTED]> wrote: > > > > > ...snip... > > > at boot up (Enigma), I get the sound server "Informational" > > > alert that there was a problem initializing the sound driver. > > > Device"/dev/dsp can't be opened (no such device)", blah, blah, > > > blah....snip... > > > found the info on running "sndconfig". Trouble is that > > > following > >> instructions (to type "sndconfig" at the command line) resulted > >in> the message ... > > > "bash: sndconfig: command not found." > >> ...snip... > > > > > >echo $PATH > > > >I'd bet /usr/sbin isn't in there. And if you logged in as $USER and > >used su to get to root, /sbin won't be there either. > > > Well that appears to be incorrect: > > --------- > > /usr/lib/courier/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/h > ome/patrick/bin > ~~~~~~~ > ---------- > > > >Need to edit > >~/.bash_profile (for the user) or /etc/profile (for the system, my > >preferred method) and add /usr/sbin into the obvious path statement > >near the top. Neither will get it permanently assigned everywhere > >until you logout and back in. > > > "/usr/sbin" seems to be in the "path statement" on the system > ... > > ------------ > # Path manipulation > if [ `id -u` = 0 ] && ! echo $PATH | /bin/grep -q "/sbin" ; then > PATH=/sbin:$PATH > fi > > if [ `id -u` = 0 ] && ! echo $PATH | /bin/grep -q "/usr/sbin" ; then > PATH=/usr/sbin:$PATH > fi > > ------------ > > ... So, I'm still confused. > > I log in as me (my user), then "su" (no dash) to root, when > needed, BTW. > > > > > > Patrick Beart > The su command, by default, is not a login shell. It sets the environment variables `HOME' and `SHELL' from the password entry for USER, and if USER is not the super-user, sets `USER' and `LOGNAME' to USER. See: info su
So, if you login as USER, you get USER's $HOME and $SHELL and are in that directory. If you do: $PATH you will get the path in bash_profile for the USER. If you then: su root you will still be in USER's directory as root, but still have USER's $SHELL. Do $PATH again............ Now do: su - root and look for the change in the directory in the <prompt>. Do: $PATH and you will have $HOME and $SHELL for root. (I think I got all that right..........) The important point is that the '-' option in the su command runs the login file for USER specified. Otherwise it stays as is. Tom _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list