I've been through this a couple times now, and I've managed to lock myself out twice. So, now I'm trying to follow instructions carefully.
create an unprivileged user
root@third:~# useradd fred
root@third:~# passwd fred
New password:
Retype new password:
passwd: password updated successfully
root@third:~# usermod -aG sudo fred
root@third:~# groups fred
I thought the point here was that I was to log out as root and back in as fred. I get nothing that way:
root@third:~# exit
logout
Connection to 143.110.153.42 closed.
$ ssh fred@143.110.153.42
fred@143.110.153.42: Permission denied (publickey).
$
After the useradd, I go in, and there's nothing in home. That doesn't make sense to me.
Oh, and by the way: sudo su is still around in far too many HOWTOs. You do not need su at all, uninstall it. Use sudo -i if you insist on getting an interactive root shell. Use sudo -e somefile to edit a file as root.
Okay, copy that.
root@third:/# which su
/usr/bin/su
Is that as easy as
rm /usr/bin/su
Thanks for your explanations and advice.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|