su password

I finally got my pi up and flying. Love it. Used NOOBs to install raspbian and got the wifi to work on my modem router with little problem. So, I ssh in from my slackware box cuz it has a better keyboard/mouse and that's going well. The key to flawless install was formatting the SD disc with SD Formatter utility instead of a plain ol' Windows format on an XP machine.

I wanna install emacs and I want to do it as root, as I've never liked the sudo thing. My only problem is how to get super user from the xterm. I've searched the web for the default root password, but none of them work (Raspbian, Raspbme, etc.) Can I even do root via su? Or must I do root as a login shell? I typically use su - on my slack box. Oh, it's Raspbian from NOOBS_v1_2_1.

BTW, being new to debian, I've a lot to learn. I ran across one website talking about installing emacs and it sez:

--
Step 4: Make sure your system is up to date. In this step we get the 
package manager to download all the latest and greatest libraries. New 
 Click to see the full signature
Reply to
notbob
Loading thread data ...

What's wrong with sudo su - Works for me. :-)

Update gets the latest package information, upgrade installs the relevant packages (i.e. those that you have installed for which a newer version is available).

Reply to
Rob Morley

Raspian does not have a default root password; therefor root logins are disabled. You can set one up, though.

You can start a root session using "sudo -i" with your normal password. Most people are happy to stick with that.

If you insist on having a root password, then from that root seesion do passwd, and set it up as usual.

This is actually all standard linux; nothing debian-specific.

Yes, do it. "update" updates the package database; "upgrade" installs the latest packages.

Reply to
Tony van der Hoff

If you sudo passwd root, you can set it to whatever you want.

--
roger ivie 
rivie@ridgenet.net
Reply to
Roger Ivie

AIUI, you need to 'update' before you can 'upgrade' - at least, that's what I've always done on my Debian boxes.

Justin.

--
Justin C, by the sea.
Reply to
Justin C

Well yes, obviously you need to check which packages have been updated in the repositories, otherwise apt won't know what needs upgrading on the local system.

Reply to
Rob Morley

it is advisable, or you want actually get any upgrades. :-)

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
 Click to see the full signature
Reply to
The Natural Philosopher

A script that runs:

apt-get update apt-get upgrade

works for me. I called my example rpi_upgrade and put it in /usr/local/sbin so I can either run it as root (yes, I set the root password so I can login or su to root) or with a "sudo rpi_upgrade" command from a normal user.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie

Don't forget the little-mentioned:

sudo rpi-update

Which fixes the firmware. Prior to this I was suffering frequent SD Card corruptions.

Reply to
Gilbert Smith

Why is it not?

sudo apt-get rpi-update

I'm confused.

nb

Reply to
notbob

As a long term Unix user I was accustomed to use 'su -' to get a root shell.

However, noting that the shell is normally 'bash', I have found that 'sudo bash' seems to get you into a shell which can then action all the commands you would normally precede with 'sudo'.

I'm not at all sure what the difference is functionally from the 'su -' route.

IIRC 'su root' just changed user and group ID whilst 'su -' also actioned '.profile' and other such things.

A bit weird to be able to get root privileges without a password, but this is a 'play and destroy' system, not a commercial server.

Cheers

Dave R

Reply to
David.WE.Roberts

...

sudo requires the user's password and can vet and/or log each command run. su requires the root's password. AIUI sudo and su will both get you to a shell which will allow commands to be run as root (as can be seen with whoami and similar).

James

Reply to
James Harris

Yeah, I like to logon to root as su - so as to set a red prompt via root's .bash_profile and set some alias defaults for rm. I also disable sudo, which I despise.

heh heh.... I like that. But, I wanna learn about debian, so jes getting in with sudo su - is good enough, for now.

thnx nb

Reply to
notbob

On Mon, 14 Oct 2013 18:15:30 +0100, "James Harris" declaimed the following:

Doesn't sudo also make use of a configuration file that can control which users are allowed to invoke, and some subset of commands permitted to be executed via it?

formatting link

{It's been some 15 years since I last had a running Mandrake box, and I'm not even sure I could find the current incarnation of that release -- I have a Mandrake 10 DVD/book set, nothing from the Mandriva era, and who knows now}

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

Yes. The file is called /etc/sudoers

There is a manpage describing the file. The preferred way of editing it is with visudo, which syntax checks the file when you exit the editor. If errors are found it tells you and lets you re-enter the editor to fix the file.

visudo uses whatever editor the EDITOR environment variable specifies. EDITOR to vi in most distros, but possibly it will default to (shudder) nano on the RPi.

Note that changing EDITOR also affects less. So, if you change its default setting as I do, you'll affect both visudo and less.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie

The key difference that with "su", "sudo bash", "sudo su" and such, there are still elements from the (non-root) user in the new process. IIUC, environment variables and current working directory are part of that.

In contrast, "su -" and "sudo su -" (the hyphen being the key), the environment, current working directory, and everything else is connected with the new (root) user rather than the old (non-root) user.

FWIW, except when doing a single command ("sudo apt-get update" for example), I try to _always_ add the hyphen, as in "su -" and "sudo su -".

HTH

--
Robert Riches 
spamtrap42@jacob21819.net 
 Click to see the full signature
Reply to
Robert Riches

I see nobody answered your question re: why "sudo rpi-update" to fix the firmware. I am afraid I don't know, I'm only a newby who was very glad to read it somewhere.

Reply to
Gilbert Smith

rpi-update is a separate piece of software that just happens to have "update" in the name, nothing to do with the apt tools. It updates the GPU firmware that is loaded from the SD card, by pulling the latest version from GitHub, which may be a newer version than the one in the repository. It can also be used to change the firmware to an earlier version.

Reply to
Rob Morley

su -i

or

sudo passwd root

Careful! Enabling root can manifest strange demons (probably daemons too)

On 10/10/2013 07:38 AM, notbob wrote:> I've searched the web for the default root password, but

Reply to
kg7fu

Yes, it all works: su -, sudo, and root login. I had them all working along with headless operation via ssh within a couple of hours of getting mine. There's no way I'm not going to have root access on my RPI working exactly the same as my bigger boxen.

Unless, somebody has 'fixed' root logins for some odd value of 'fixed'. I set this up on one of the earlier 512MB model Bs to be released and its still working as we speak on a fully patched copy, as of Friday PM, of Raspbian.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.