Solutions for su:authentication failure under Ubuntu (difference between Su and su-root)

Source: Internet
Author: User

Under normal circumstances, if I want to switch to root can be directly with sudo-i and then enter the password login root, but today read the textbook said Linux is used su-root switch, so the hand cheap try, and then appeared su:authentication failure error hint , and then online search to find solutions, as follows:

$ sudo passwd root
Enter new UNIX password: 
Retype new UNIX password: 
passwd:password updated successfully
After the success of the SU-input password can be switched to root, by default su is switched to root, and ru-root effect is the same.

Later I want to reproduce the above process, and found that as long as you sudo passwd root once, the next time Su time as long as the input password can be successfully logged in, will not appear su:authentication failure problems.


----------------------------------Update 20131229-------------------------------

Today, I accidentally tried again Su and su-root, the results are not the same:

myubuntu@ubuntu:~/desktop$ su
Password: 
root@ubuntu:/home/myubuntu/desktop# exit
exit
myubuntu@ubuntu:~/desktop$ su-root
Password: 
root@ubuntu:~# exit
logout
myubuntu@ubuntu:~/ desktop$ Su-
Password: 
root@ubuntu:~# 

It is known that the current path pwd unchanged after Su to root, and su-root or RU-cut to root after the root directory of root.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.