switch to root user
Im getting confused with my user account and the root account.
When I installed Ubuntu, the installation asked me to provide a username and a password which I now used to login the system. Now , when I want to switch to root , "su" prompts me for a password that I dont know. Instead I use "sudo su" and type in my username`s password. Is this the correct procedure to switch to root user? Please help me... |
Quote:
|
hii
try su - or go to > switch user > and then graphically go root and enter passwd |
you can also use sudo -s once to become root and then set the root password using passwd
|
Thanks to everyone for the info
|
hello if you need to create a root password you can do it like this;
:~$ sudo passwd Password: Enter new UNIX password: Retype new UNIX password: after this step you can able to login with root user. |
The one and only flaw in Ubuntu......;)
Even after enabling the root account, you will still be prompted for your user password when trying to do admin tasks. You can get used to it, but I solved it by not using the _buntus |
Quote:
With each release, Ubuntu seems to make it harder to use root the way I did in Redhat/Fedora. If they keep it up, I may return to Fedora or start using Debian or Mint. |
I like Debian ("in the raw" as I say) it's a little better
|
As you can tell from the previous messages, Ubuntu disables root logins by default, and you are expected to use "sudo" and enter your own password. If you have other users on the system, not using targetpw in sudoers, allows you to give some administrative rights for certain commands without giving up the root password. This does require some work plugging holes, such as entering :!/bin/bash in vim, however if you are the only user, then targetpw is fine.
Many users using Ubuntu come from Windows and have the mind set to want to run as root when they shouldn't be. You probably have seen a number of messages on this site where people get in trouble doing weird things in system directories and then getting into trouble. It should never be necessary to log into an X windows session as root and doing so shouldn't be allowed either. Preventing these things helps protect newbies from themselves. |
Quote:
|
Because the RH,Debian etc way is the way Unix (eg Solaris HP, AIX etc) works, the Ubuntu approach is non-std, which is more-or-less what some posters have alluded to above.
I prefer the orig Unix way myself as well, but jschiwal's 2nd para explains why Ubuntu did that. |
I use Ubuntu all the time in my office desktop and feel that not allowing root login in X is one of the good options Ubuntu has provided. I have seen some of the newbies in the office delete the system file unknowingly from X and then paying the price for it.
And jschiwal has already explained why this option can save systems. And I fully agree with him and I still use Ubuntu and like the option. With some usage you get used to it and dont mind providing password to keep your system safe. Atleast I dont mind it. |
Quote:
I know what Ubuntu was trying to do. I disagree with what I highlighted, in bold, in jschiwal's post. That is his opinion, not a fact and thankfully, the Redhat and Debian communities also disagree. The so called "Ubuntu way" in regard to root and sudo is starting to remind me more of the "Microsoft way", we'll force you to do it our way. |
The only time in the last 2 or 3 years I can remember actually logging in as root was when I logged into a virtual terminal (in run level 3) to run the nvidia install program.
I usually use sudo. If I am in /var/log and looking at a number of root read only logs I might use "su -" instead. Running a command that redirects the output is easier to do as root than using sudo. This is because the file descriptor is created using the effective uid of the sudo command, which is of the normal user. There is a related difference between distros in using sudo as well. Fedora core & Ubuntu configure sudo by default to use the user's own password if they are a member of the wheel group. OpenSUSE configures sudo so that you need to enter the root password. If you have more than one user on your system and you don't want to give others the root password, then the former method is better IMHO. I think that most distros seem to be adapting PolicyKit which may reduce the need to use sudo. Especially for common items performed graphically, such as ejecting a CD or DVD or USB device. |
All times are GMT -5. The time now is 11:40 PM. |