Regarding ubuntu

sudha

Distinguished
Feb 16, 2011
2
0
18,510
I installed ubuntu ....i am not sure abt the root password ......but i am in need of root password to perform various operations...how can i retrieve the root password..please do me a favour............ :bounce: :eek:
 

chamaecyparis

Distinguished
Nov 21, 2010
321
0
18,810


in terminal, enter the command

sudo passwd root

tell us what happens!
 
If you don't know the answer to that ....

Assuming that you follow recommended practice and do not use a root account as your primary account, you don't save any keystrokes; it would be considerably more long winded to log out of your normal account and then log on as root, and then logout again. It's quicker and safer to use sudo.
 

chamaecyparis

Distinguished
Nov 21, 2010
321
0
18,810
Debianites and ubuntuites will probably never agree on this. Sometimes I do not even log in to the window, but Ctrl-Alt-F2 to console and perform updates and installs there. To each his own . . . and then there are Slackers . . .
 

someone19

Distinguished
Jan 16, 2011
441
3
18,810
+1 for sudo.

I've been using linux since Slackware 1.2, currently been using Gentoo for 5+ years, and truthfully, I edit /etc/shadow and add a character to the hash for my root's password, effectively disabling logon by any source. I use my user account and sudo exclusively. If there's a time that I'll be doing a large amount of commands as root, I simply 'sudo bash' and now I have a privileged command prompt. An underused and under recommended command is sudoedit. In this way you can edit a file with privileges, but in a controlled manner. The additional benefit of sudo is that you can configure it to allow various commands without prompting for a password, and it logs any access or commands run with privileges.
 

chamaecyparis

Distinguished
Nov 21, 2010
321
0
18,810
Thanks, someone19 -- Slackware users will for a long while remain a good source of instruction for me. I use Slack-based distros as second choice mostly because I'm too lazy to use Salix all the time. (A longterm goal is to become competent with it.) I'll check into those sudo tricks you mention, as they sound useful.

Meanwhile, I'll use Debian-derived distros and delve into PERL on occassion when needed. I feel that PERL is under-recommended, too, for individually-specific problem-solving. It seems easier than bash script, to me. I also see where dependency resolution and apt-get package management are making inroads into "Bob's" territory -- interesting!

Things keep changing in Linux Country. Witness Zorin OS. I see it as a logical extension of what ubuntu began, no matter how many decry it as a "Windows clone." Any observations along this line?
 

someone19

Distinguished
Jan 16, 2011
441
3
18,810
man sudo, just remember NEVER edit /etc/sudoers

There is a special command that can only be run as root called visudo that edits that file with proper permissions.

I like the feel of Gentoo, I'm not sure of its lineage, but the philosophy goes to customization and performance. Its not for the faint of heart however, but you learn exactly how the system gets configured and setup. Another is to read the documentation in http://www.linuxfromscratch.org/ It documents how to build an entire os from source code.
 

sudha

Distinguished
Feb 16, 2011
2
0
18,510
what i did is that on the boot menu it will display recovery mode in that i edited :p and appended the init file with the command rw init=/bin/bash....then a list box displays,,,,better to choose root login recovery mode and by that option i set a new password for my root........................... :( :ouch: :p :bounce: :sarcastic:
 

someone19

Distinguished
Jan 16, 2011
441
3
18,810

Apparently I'm old skool then. I do remember that visudo was in the man page as being the only safe way to ensure the proper editing of the file, as stray ASCII characters or even an improper <CR><LF> would render sudo unusable. I don't see that warning anymore, so it must be more tolerant of errors in formatting.

My apologies for being a long time user.