On Sun, Feb 20, 2011 at 07:27:38PM -0500, Roy wrote:
> as root or changing to root temporarily. I believe that su actually means
> substitute user and not switch user as previously said.
Heh, maybe means super user, though I doubt it, as you can actually su
to any user.
Then there is Fedora
> which has su and su -. If you run as su then you cannot affect system wide
> changes. For that you need su - which means su - root. In many distros then
> su is understood as root, but the su - is the traditional Unix way. You can
> actually type su - bob to run as user bob. Then there is gksu and kdesu. It
> all makes for an interesting experience.
This has actually changed, around F10 or so. Fedora used to have root
(in root's environment), have access to /sbin, /usr/sbin, and
/usr/local/sbin (I think), while regular users only had /bin,
/usr/local/bin, $HOME/bin and the like. However, it's now changed so
that all users have, by default, the /sbin directories in their path.
There are still some environment variables that you might only get if
you do su -. The space dash, as the man page says, gives you the log
in environment. So, if I do su, I'm still in my own home directory--if
I do su -, I'm in root's home directory.
Both OSX and Ubuntu, as well as other Linux distributions that use sudo
by default without creating a root user, will allow you to do sudo su
or sudo su -, thereby becoming root without having root's password. (If
you Fedora, the BSDs, or anything else that can use sudo, even if they
don't by default, that is, anything with a root account created, the
same thing applies.)
Some of the more traditional Unixes, for example AIX, still only give
/sbin as a path to the root user.
--
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
Xander: Well, I guess that makes it official. Everybody's paired
off. Vampires get dates. Hell, even the school librarian sees
more action than me.
Sunday, February 20, 2011
Re: [LINUX_Newbies] Re: Why windows gets more malware than Unix ,Linux and Mac?
__._,_.___
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.
.
__,_._,___
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment