Just a post of the terminal script...to change root password: sudo -i passwd
type in new password twice...and you're finished.
script to change root password
script to change root password
Regards, jonnken...since Feb 2019
Dell Latitude E6440...Intel Core i5-4310M...240G SSD...MX-19.4_x64
Dell Optiplex 755...Intel Core2 Duo E8500...300G HD...MX-19.4_x64
Dell Latitude E6440...Intel Core i5-4310M...240G SSD...MX-19.4_x64
Dell Optiplex 755...Intel Core2 Duo E8500...300G HD...MX-19.4_x64
Re: script to change root password
That's not a script.
-i?
The normal way to do this is "sudo passwd root"
You would, then, normally be asked for your user password unless recently cached, and then be prompted for the new root password twice.
Why did you post this?
-i?
The normal way to do this is "sudo passwd root"
You would, then, normally be asked for your user password unless recently cached, and then be prompted for the new root password twice.
Why did you post this?
Re: script to change root password
Just a new linux user here...wishing there was more bash command content on this channel.
Regards, jonnken...since Feb 2019
Dell Latitude E6440...Intel Core i5-4310M...240G SSD...MX-19.4_x64
Dell Optiplex 755...Intel Core2 Duo E8500...300G HD...MX-19.4_x64
Dell Latitude E6440...Intel Core i5-4310M...240G SSD...MX-19.4_x64
Dell Optiplex 755...Intel Core2 Duo E8500...300G HD...MX-19.4_x64
Re: script to change root password
wishing the same, but in the meantime:wishing there was more bash command content on this channel
tdlp.org Bash Beginners Guide http://www.tldp.org/LDP/Bash-Beginners-Guide/html/
Bash-Beginners-Guide (Rutgers) http://linuxcourse.rutgers.edu/document ... ers-Guide/
linuxcommand getting started book www.linuxcommand.org
Ryan's tutorials: Bash Scripting Tutorial https://ryanstutorials.net/bash-scripting-tutorial/
BASH Programming - Introduction HOW-TO http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
Bash Scripting Tutorial for Beginners https://linuxconfig.org/bash-scripting- ... -beginners
the Advanced Bash-Scripting Guide http://tldp.org/LDP/abs/html/index.html
Barely Legal https://wiki.bash-hackers.org/
GNU Bash Reference Manual https://www.gnu.org/software/bash/manual/bash.html
BASH Frequently Asked Questions http://mywiki.wooledge.org/BashFAQ
shell Style Guide https://google.github.io/styleguide/shell.xml
tips better-bash-scripting-in-15-minutes
Linux Shell Scripting Tutorial https://bash.cyberciti.biz/guide/Main_Page
learn by reviewing examples (and discussions / comparisons / alternatives):
https://commandlinefu.com
http://www.bashoneliners.com/
stackexchange.com
serverfault.com
Simplified manual pages X {--- Y {--- Z
^------ I cannot recommend these. Each presents an identical dataset.
Only 300 or so commands within the dataset are LINUX commands, and the coverage spans a confusing mish-mash of commands (e.g. yum, pacman) from disparate linux distributions.
Glossary of common technical terms https://distrowatch.com/dwres.php?resource=glossary
archived Questions and answers columns https://distrowatch.com/qanda.php
archived Tips and tricks columns https://distrowatch.com/tips.php
Discussion sites/forums:
https://www.unix.com/shell-programming-and-scripting
https://www.unix.com/unix-for-advanced-and-expert-users
https://old.reddit.com/r/commandline
interactive:
http://www.bash.academy/
https://www.learnshell.org/
https://shellcheck.com
https://codeacademy.com
also (not linking any here, plenty exist)
websearch "bash cheat sheet" or "shell scripting cheat sheat"
Last edited by skidoo on Fri Apr 12, 2019 1:48 pm, edited 3 times in total.
- rokytnji.1
- Global Moderator
- Posts: 723
- Joined: Sun Apr 13, 2014 9:06 pm
Re: script to change root password
Nice post ^^^^^^^^ edit: ?sticky?
I keep this around for stuff hard to remember
https://launchpad.net/clicompanion
2nd. Edit. I'll throw this in here also.
https://www.cyberciti.biz/
I borrow their command tips also.
https://www.cyberciti.biz/tips/top-linu ... tools.html
I keep this around for stuff hard to remember
https://launchpad.net/clicompanion
2nd. Edit. I'll throw this in here also.
https://www.cyberciti.biz/
I borrow their command tips also.
https://www.cyberciti.biz/tips/top-linu ... tools.html
Re: script to change root password
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: script to change root password
.
no point marking the topic sticky unless the title is changed to something snazzy, like, ummm muh toE wont boot`s
no point marking the topic sticky unless the title is changed to something snazzy, like, ummm muh toE wont boot`s
Re: script to change root password
comment: glad the info will be more discoverable via wiki page, but the attribution is unwarranted.
It's just a list pulled from bookmarks. It is not comprehensive; the page will benefit from further additions contributed by others.
It's just a list pulled from bookmarks. It is not comprehensive; the page will benefit from further additions contributed by others.
Help for anyone interested in learning to write scripts for the command line (CLI) from a post by user skidoo.
Re: script to change root password
Welcome. Skidoo's list is almost heroic. It the old days, we had books. The Internet resources are like drinking from a fire hose. As you learn, you'll find that it's not just bash, but all of the Unix and Linux shells have much more in common than things that distinguish them and make them behave differently.
Working in bash is generically called shell programming or shell scripting. Be sure to learn about files and directories. Learn how to use a good editor. Create a tests directory and better yet, a test platform for experimenting. Working in the shell can result in shooting yourself in the foot. Working as root can be fatal to your installation.
Re: script to change root password
thanks figueroa, skidoo, roky, jerry....great new resources I'll check out.
Regards, jonnken...since Feb 2019
Dell Latitude E6440...Intel Core i5-4310M...240G SSD...MX-19.4_x64
Dell Optiplex 755...Intel Core2 Duo E8500...300G HD...MX-19.4_x64
Dell Latitude E6440...Intel Core i5-4310M...240G SSD...MX-19.4_x64
Dell Optiplex 755...Intel Core2 Duo E8500...300G HD...MX-19.4_x64