Login in problem

Jul 05, 2018 31 Replies

'su newaccount -' ?

man su.... " -, -l, --login Provide an environment similar to what the user would expect had the user logged in directly.

When - is used, it must be specified as the last su option. The other forms (-l and --login) do not have this restriction.

"
Renewable energy: Expensive solutions that don't work to a problem that doesn't exist instituted by self legalising protection rackets that don't protect, masquerading as public servants who don't serve the public.

'su -l peter' is somewhat better

?Progress is precisely that which rules and regulations did not foresee,? ? Ludwig von Mises

sudo passwd root....

?A leader is best When people barely know he exists. Of a good leader, who talks little,When his work is done, his aim fulfilled,They will say, ?We did this ourselves.? ? Lao Tzu, Tao Te Ching

Except that its trivial to set a root password if you have full sudo rights

?A leader is best When people barely know he exists. Of a good leader, who talks little,When his work is done, his aim fulfilled,They will say, ?We did this ourselves.? ? Lao Tzu, Tao Te Ching

The first thing I do on any new linux install is

$ sudo passwd root.

Then any time I need root for more than a single command

$ su -

and enter the root password.

?I know that most men, including those at ease with problems of the greatest complexity, can seldom accept even the simplest and most obvious truth if it be such as would oblige them to admit the falsity of conclusions which they have delighted in explaining to colleagues, which they have proudly taught to others, and which they have woven, thread by thread, into the fabric of their lives.? ? Leo Tolstoy

Given that sudo doesn't prompt for pi's password in the standard setup.... Meh :)

Does it not?

ROFLMAO!

Well its just a toy unless you are experienced enough to make it into something more, and that implies you know how to set a password too...

Religion is regarded by the common people as true, by the wise as foolish, and by the rulers as useful. (Seneca the Younger, 65 AD)

All sorted, and root password set too. Thanks for the help.

From /etc/sudoers (well, an included file in /etc/sudoers.d/ ) pi ALL=(ALL) NOPASSWD: ALL

So for serious use, for a start, remove that included file or remove/comment out the line. But I never did because like you say, I mainly use them as toys and they?re all behind a firewall. Ok, there?s one web server..

OK, so the ways you might login using the username and password you created are:

  1. If you enable SSH and login from another machine using an SSH client
1b. Similar with VNC or X11 instead of SSH
  1. If you disable Pixel and fall back to a text login screen on boot
  2. If you press Ctrl-Alt-Fn (n=1 to 6) to drop out of Pixel into a text login screen
  3. If you type 'su - peter' to switch from one user to another in an existing terminal
  4. If you configure Pixel or install another desktop environment that has a GUI login screen

Probably #1 and #3 are the most common use cases. Pixel is rather unusual in that it doesn't prompt for a user login on boot, which most other desktop environments do.

Theo

It is also easy enough to write a sudoers file that does not permit running passwd or a shell (or visudo). A well maintained sudoers file is one mark of a properly managed server.

Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun The computer obeys and wins. | licences available see You lose and Bill collects. | http://www.sohara.org/

If you do a web search for something like 'raspberry pi free e-books' you'll find several beginner type books that will help to give a basic understanding of linux commands. Also, the newest raspbian image has added a 'first boot wizard' which you might find useful. You should be able to install it to an existing card with 'sudo apt-get install piwiz' and then run with 'sudo piwiz'. See raspberrypi.org/blog for more info on that.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required