Pages

Wednesday, July 29, 2015

Windows Operating System- "net user" Command

net user [username [password | *] [/add] [options]] [/domain]] [username [/delete] [/domain]] [/help] [/?]

This command can be very useful if you have administrative privileges to the computer your working on. (Since most times I've used this its been for other people with computers they "found")
*HINT: Sometimes you can access the administrative user through safe mode

Most times I've used this tool it was to delete the current user and make a new one. This allows for all viruses, configurations, applications  and restriction of the old user to be erased.

As long as someone did not change the account settings, by default, there are two admin accounts. See image here:
https://s.yimg.com/lo/api/res/1.2/dCXTNoowPX_i2XZJNiuZFA--/YXBwaWQ9eWlzZWFyY2g7Zmk9Zml0O2dlPTAwNjYwMDtncz0wMEEzMDA7aD0zNTE7dz02MDA-/http://thewindowsclub.thewindowsclubco.netdna-cdn.com/wp-content/uploads/2014/05/Net-User-command-600x351.jpg?0479ea.cf.jpg
You will see two main accounts, the user account that has admin privileges and another user called administrator. The administrator account sometimes can be accessed from safe mode (it won't have a password by default) and can use the net user command without the users password, allowing you to delete the user account and Create your own.

One time at McDonald's I was doing work on my  laptop and someone else was having issues with there PC in front of me. I asked what was wrong and they gave me a issue about there PC that was new to me at the time. The man said to me that he had found his mini laptop in a garbage and grabbed it. He could get on the guest user but nothing else. So I went to work and thought up of a good idea, delete the old user and make a new one. But with out the user password, this would be hard. So I went through the laptops safe mode and got into the user accounts log in screen which had two options, the main locked user account, and administrator. I clicked on admin, and it logged in right away. I got on the cmd or terminal and deleted the old user with command:
c: net user [user] /delete
I added the new user with:
c: net user [new user] [new user password] /add
Like: [c:net user mike password123 /add]
Added them to the admin localgroup:
c: net localgroup [new user] Administrators /add
And restarted the PC. Logged on to the new user account and he was free to do what he wanted. At least that's one way to do it.

Tuesday, July 28, 2015

Linux Operating System-Change Directory Command Explained

cd [-L | -P] directory 
cd [option] [location]
usage: cd [-L|[-P [-e]] [-@]] [dir]


The cd command stands for "Change Directory". cd changes the kernals or shells (terminal) current working directory.
anon@anon-Inspiron-3521:~$ cd /home
anon@anon-Inspiron-3521:/home$ 
Here you can see the current directory is ~$ which stands for /home/[name of user] for the users home folder. Then the current directory is changed to /home$ which means that the shell is in the main home folder. If I list out the directories, from the /home$ file

anon@anon-Inspiron-3521:/home$ ls
anon
The list of files in /home would only show the list of active home folders for the current user. I am the only user on the computer and the only home folder I have on the operating system is the one main one, so the only home folder to show is mine.
Typing cd into the terminal will change the directory to the users home folder, in my case it would be /home/anon. 

Main files to change to:
Computer Files "/"
Home Folder "/home/anon" (/home/[name of user]) also acquire the user home folder by typing "cd"
Example text for paste and entry:
cd
cd ..
cd /
cd /etc
cd /bin    
cd /dev  
cd /sbin  
cd /tmp  
cd /boot   
cd /etc  
cd /mnt    
cd /root 
cd /usr  
cd /cdrom  
cd /home  
cd /lib 
cd /opt    
cd /run   
cd /sys   
cd /var


Monday, July 27, 2015

System Error Message Fix (Ubuntu)

For Ubuntu Desktop Distribution, or any Linux OS sometimes you will get some annoying error messages that pop up in the top left hand corner saying something like "internal error detected" or "system application error" or something along those lines. One easy way to remove these messages is to take out the error logs by removing the crash reports.
Like so:
~$ sudo rm /var/crash/*
And doing so will remove the crash reports and stop those annoying pop ups.

Linux Operating System (Ubuntu 14.04-Installs)

I have been running Linux Ubuntu 14.04 for the last couple months, I can say for sure that it took me a minute to get used to the unity desktop enviorment. I have installed a couple of things to make my life a lot easier, and i figured for anyone out there that is reading this you will benifit by installing what i did. So i will give you a list of packages to install to make life easy and to switch to a different desktop enviornment. I use gnome. As well flash is a problem with linux as well. I have fixed flash issues by installing chromium and pepper flash, which is supported where the old flash is not. I will be putting a line of application removal to remove firefox, as it will not be needed after you install chromium.

LIST: (YOU CAN COPY AND PASTE OR COPY THE WHOLE LIST AND SAVE IT TO A FILE AND RUN THE FILE IN THE TERMINAL)
(Starting from here and below you can copy this and past it to a file and save the file, make it runnable by terminal and run it- by dragging the file to the terminal and pressing enter)
echo
sudo apt-get update
sudo apt-get upgrade --force-yes -y
sudo apt-get install tor --force-yes -y
sudo apt-get install privoxy -force-yes -y
sudo apt-get install gnome-session-flashback --force-yes -y
sudo apt-get install chromium-browser --force-yes -y
sudo apt-get install pepperflashplugin-nonfree --force-yes -y
sudo apt-get purge firefox --force-yes -y

Then let it do its thing. Good luck

Linux Operating System

Terminal(kernel) Commands:
There is a vast number of Terminal commands at your disposal while using linux. These commands are divided into groups of access. Some groups of tools require you to have "root" access to use them, (Click here to learn about "root" access) due to the action or configuration the tool will be requesting. Others do not require the "root" level of access, these tools are not modifying any files or applications on the operating system. 
-EXAMPLE non-root Terminal Tools:
~$ clear (Clears the terminal session screen by moving all previous commands up and out of site until only the command line is visible)
~$ cd (Change Directory- Used to change to different files(Directories))
-EXAMPLE:
anon@anon-Inspiron-3521:~$ cd /home
anon@anon-Inspiron-3521:/home$ 
~$ ls (LiSt- Requests the terminal to list all files in the current directory the terminal is in)
-EXAMPLE:
anon@anon-Inspiron-3521:~$ ls
Desktop
Documents
Downloads
Music
Pictures
anon@anon-Inspiron-3521:~$ 
~$ mv (Moves a selected file to a selected location)
I will be using "Example" to be moved to location "Downloads"
-EXAMPLE:
anon@anon-Inspiron-3521:~$ mv Example Downloads
anon@anon-Inspiron-3521:~$
And then there are other commands that require root access to use them (most of the time) such as APT. One tool for updating and upgrading and installing apps onto the linux operating system.

There are limitations and restrictions as well as allowances to the root access commands. Read carefully. The commands that require root access ONLY require root access when the command is in direct contect with the operating systems main files or root home folder and is requiesting to change or configure a file or derectory in the main OS derectory. Sounds complicated, i know. But follow along. A file in the "/" location (Which is the place where all of the computer configuration files and coding for applications are) is the main operating systems files, to change or configure a file in this location you must have root privileges.
Here are some commands that wont work with out root privileges.
The "cd" command requiesting the "root" folder:
anon@anon-Inspiron-3521:/$ cd root
bash: cd: root: Permission denied
anon@anon-Inspiron-3521:/$ 
You can see a "permission denied" notice where the operating system did not allow the requiest for access. 
Now to try in under root privleges using the "sudo bash" command to keep our root access for more then one use.
anon@anon-Inspiron-3521:/$ sudo bash
root@anon-Inspiron-3521:/# (Changed to root terminal)
root@anon-Inspiron-3521:/# cd /root
root@anon-Inspiron-3521:/root# 
You can now see that the "root" folder is open on the terminal since "/root#" is in front of the terminal command line. (For the future "#" is a sign of "root" access in a terminal)
And that is what a root terminal will look like. If you ever get a permission denied notice, that means that the command your entering requires root privlages. Try sudo in front of whatever your trying to do.
My (Simple) list of commands:
cd -change der
ls -list
mv -move
rm -remove
cp -copy
scrypt -encryption
service -service orderer (porxies and such)
ifconfig -network tool
nano -text editor
sudo -root command when placed in front of a command
sudo bash -perm root command for session
echo -repeat
apt-get install -install app
apt-get update -update system from sources list
apt-get upgrade upgrade system from data stored from update
apt-get dist-upgrade -system upgrade from sources list
I will go over all of these in later posts, please wait.
 

Sunday, July 26, 2015

Linux Operating System

Terminal:
Linux is the operating system I've come to love using with all of its pros and cons. Of the mass amount of information I am able to tell the reader, I think a good place to start is at the terminal, since a lot of problems are caused and solved by changing and configuring files and applications from the terminal, having this level of access to the Linux operating system can be dangerous. I've solved a lot of problems with the terminal as well as crippled the operating system with this tool. The terminal is a access panel, of sorts that allows you to change, move and configure files that the operating system is allowed to manage. 

There are two main levels of access on a linux operating system. Root, and non-root. The non-root access level is allowed to use applications and read files, and thats it. The non-root level of access is not allowed to change or configure any files or applications on the operating system.
non-root EXAMPLE:

anon@anon-Inspiron-3521:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Here I have tried to update the operating system from the /etc/apt/sources.list, but i cannot because I am using my non-root level of access. The root level access controls everything on the computer, and without it you cannot change or in this case update the operating system. With the root level access, i am able to change or update or configure any file or application i need. To get to the root level access on my linux operating system i will use the trustee "sudo" command. HINT:(If you put "bash" after the "sudo" you can keep the root level access in the terminal for that terminals session Eg. "sudo bash")

root EXAMPLE:

anon@anon-Inspiron-3521:~$ sudo apt-get update
[sudo] password for anon: 
Hit http://repo.steampowered.com precise InRelease
Ign http://security.ubuntu.com trusty-security InRelease                       
Ign http://us.archive.ubuntu.com trusty InRelease                              
Hit http://repo.steampowered.com precise/steam Sources                         
Hit http://security.ubuntu.com trusty-security Release.gpg                     
Ign http://us.archive.ubuntu.com trusty-updates InRelease                      
Ign http://us.archive.ubuntu.com trusty-backports InRelease                    
Hit http://security.ubuntu.com trusty-security Release                         
Hit http://repo.steampowered.com precise/steam amd64 Packages                  
Ign http://extras.ubuntu.com trusty InRelease                                  
Hit http://us.archive.ubuntu.com trusty Release.gpg                            
Hit http://security.ubuntu.com trusty-security/main Sources                    
Get:1 http://us.archive.ubuntu.com trusty-updates Release.gpg [933 B]          
Hit http://repo.steampowered.com precise/steam i386 Packages                   
Ign http://mirror.sifnt.net.au jaunty InRelease 
(There is more but it is far too long to put here)
Etc.....    

As you can see "sudo" followed by typing in my password allowed me to update my linux operating system. Having this level of access can be very useful and effective when you want something that requires a higher level of permission, like updating.
WARNING:
Having this level of permission on your computer can be dangerous. Having all this power over your operating system can be very tempting to try and configure files or application which you don't fully understand to begin with. That being said, I advise you to only use the terminal for updating and upgrading purposes. If you need to install a application it should be in the software center, if its not i advise you not to install it.