What is su for? What's the password?

Microsoft Windows xp professional w/sp2
January 22, 2011 at 01:17:04
Specs: Ubuntu 10.10, 128MB
I'm trying to learn about Linux and one of the things I came across was the su command. What is it mainly used for? Also, with the following typed commands, how come it never works with the password (says authentication failed) I came up with when I first installed Linux...

john@localhost:~$ su
Password:
root@localhost:/home/john# exit
logout
john@localhost:~$

smc


See More: What is su for? Whats the password?

Report •

#1
January 22, 2011 at 06:20:18
The su command is used, to login as superuser.
Logged in as superuser, you have root rights to the whole system.
At a terminal console, use the man command to figure out, what a command is used for.
E.g.:
man su

Als read this man page:
http://unixhelp.ed.ac.uk/CGI/man-cg...

Click Here on HowTo ask good Question to get best Help
Let us know, if the problem is solved !!!


Report •

#2
January 22, 2011 at 09:34:04
Your output shows that the "su" command did work. After you ran it the prompt changed from "john@localhost" to "root@localhost". When you exited that root shell the prompt changed back to "john@localhost" showing that you were no longer root. Be very careful when running as root - it is very easy to destroy your system with a careless action.

It's safer to use "sudo" when you want to temporarily have root privileges. Just precede the command that you want to run with the word "sudo" followed by a space, then the command. It will prompt you for a password but in this case it is your normal user password. (This assumes that sudo has been configured with you as an allowed user.)


Report •

#3
January 22, 2011 at 17:28:45
are you running ubuntu with 128mb of ram??

larry


Report •

Related Solutions

#4
January 23, 2011 at 01:05:18
Actually I think that's a mistake...it actually defaults to say I have 128 MB every time I post unless I change it...according to my system monitor I have 937.4 MiB...what is MiB? Is that the same as MB?

smc


Report •

#5
January 23, 2011 at 11:35:08
MiB is short for MebiByte which means it's based on binary prefix, while MB is short for MagaByte and is based on decimal prefix.

So
Megabyte is 10^6 = 1.000.000 Byte
Mebibyte is 2^20 = 1.048.576 Byte

As you can see, there is a difference between both, but for the normal user, it doesn't realy matter.

Click Here on HowTo ask good Question to get best Help
Let us know, if the problem is solved !!!


Report •

#6
January 24, 2011 at 18:03:13
su means switch user but when left blank it is defaulted to root. Root may or may not be a user that has bash or other rights that a normal user would too.

As stated above most people would tend to use sudo or other ways to run elevated permissions.

There are more and more distros that dis-allow access to root for security too.

Why did it take me over a year to phone in a problem to ATT?


Report •

Ask Question