- edit file (in notepad or notepad++):
%localappdata%\lxss\rootfs\etc\shadow - find your normal user, for example:
user1:$jsdjksadgfhsdf.saflsdf.sadf.safd:17299:0:99999:7:::and simply remove the hash part (below part)$jsdjksadgfhsdf.saflsdf.sadf.safdyou will see a different hash - I hope :), so should look like:user1::17299:0:99999:7::: - Save the file
- start bash again
- sudo bash
- password this will ask for your new password without requiring previous one.
domenica 13 maggio 2018
Reset user password in Linux Bash on Windows 10
sabato 3 febbraio 2018
Which linux version we have to do with?
Here is a memo to find it:
$ uname -a
Sample outputs:
Linux vivek-laptop 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/Linux
Where:
- 2.6.32-23 – Linux kernel version number
- pae – pae kernel type indicate that I’m accssing more than 4GB ram using 32 bit kernel.
- SMP – Kernel that supports multi core and multiple cpus.
$ cat /proc/version
Sample outputs:
Linux version 3.2.0-0.bpo.1-amd64 (Debian 3.2.4-1~bpo60+1) (ben@decadent.org.uk) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Sat Feb 11 08:41:32 UTC 2012
The above output identifies the kernel version that is currently running.
$ cat /etc/*release
OR
$ lsb_release -a
Sample outputs:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid
Rif:
https://www.cyberciti.biz/faq/command-to-show-linux-version/
Check linux kernel version number
Open a shell prompt and type the following command to see your current Linux kernel version:$ uname -a
Sample outputs:
Linux vivek-laptop 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/Linux
Where:
- 2.6.32-23 – Linux kernel version number
- pae – pae kernel type indicate that I’m accssing more than 4GB ram using 32 bit kernel.
- SMP – Kernel that supports multi core and multiple cpus.
/proc/version file
Type the following command to see Linux version info:$ cat /proc/version
Sample outputs:
Linux version 3.2.0-0.bpo.1-amd64 (Debian 3.2.4-1~bpo60+1) (ben@decadent.org.uk) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Sat Feb 11 08:41:32 UTC 2012
The above output identifies the kernel version that is currently running.
Find Distribution Version
Type the following command:$ cat /etc/*release
OR
$ lsb_release -a
Sample outputs:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid
Rif:
https://www.cyberciti.biz/faq/command-to-show-linux-version/
venerdì 8 dicembre 2017
Can you store password in Putty sessions?
The short answer is no. But you have a workaround that can help you to reach the same result: a one-click Putty shortcut to your server from your desktop.
That's the issue of this article.
Here is how to do:
Now simply double-click on your new shortcut and you'll be logged on your server.
That's the issue of this article.
Here is how to do:
- Create on the desktop a shortcut to Putty.exe
- Right click on the shortcut, select "properties" and edit the target attribute
- Change
"C:\ProgramFiles\putty.exe"
in
"C:\ProgramFiles\putty.exe" root@207.150.12.233 -pw YourPassword
where
"C:\ProgramFiles\putty.exe" is the correct path of your putty.exe file
"root" to the user you would use to login to your remote server
"207.150.12.233" is the remote server IP
"YourPassword" is the correct password. - Click "Apply" then "OK" to commit the change.
Now simply double-click on your new shortcut and you'll be logged on your server.
domenica 26 novembre 2017
Eloquent collections methods
The Eloquent ORM provides a beautiful, simple ActiveRecord implementation for working with your database.
The results of Eloquent queries are always returned as Collection instances and Eloquent has a list of methods to work with Collections.
Here it is an interesting article about 10 less-known Eloquent collections methods:
avg()
chunk()
contains()
every()
filter()
forget()
implode()
keyBy()
map()
plunk()
The results of Eloquent queries are always returned as Collection instances and Eloquent has a list of methods to work with Collections.
Here it is an interesting article about 10 less-known Eloquent collections methods:
avg()
chunk()
contains()
every()
filter()
forget()
implode()
keyBy()
map()
plunk()
Iscriviti a:
Post (Atom)