Difference between revisions of "Ubuntu OS"
Jump to navigation
Jump to search
Line 37: | Line 37: | ||
Finally share the link, key, or QRcode with your friends and enjoy! | Finally share the link, key, or QRcode with your friends and enjoy! | ||
</pre> | </pre> | ||
== GuruPlug Server == | |||
<pre> | |||
Ip is set to DHCP at boot by a script. so even if you edit the /etc/interface file and add Static ip's it will change on reboot. In order to fix this this you need to edit the /etc/ifplugd/ifplugd.action file | |||
and # dhclient3 -e IF_METRIC=100 -pf /var/run/dhclient.eth0.pid -lf /var/lib/dhcp3/dhclient.eth0.leases eth0 | |||
line | |||
</pre> | |||
<html> | |||
<p>command to Show all users:<br /> cat /etc/passwd <br /> lastlog</p> | |||
<table border="1" rules="ROWS"> | |||
<tbody> | |||
<tr> | |||
<td>ac</td> | |||
<td width="10"> </td> | |||
<td>Print statistics about users' connect time.</td> | |||
</tr> | |||
<tr> | |||
<td>accton</td> | |||
<td width="10"> </td> | |||
<td>Turn on accounting of processes. To turn it on type "accton /var/log/pacct".</td> | |||
</tr> | |||
<tr> | |||
<td><strong>adduser</strong></td> | |||
<td width="10"> </td> | |||
<td>Ex: adduser mark - Effect: Adds a user to the system named mark</td> | |||
</tr> | |||
<tr> | |||
<td>chage</td> | |||
<td width="10"> </td> | |||
<td>Used to change the time the user's password will expire.</td> | |||
</tr> | |||
<tr> | |||
<td>chfn</td> | |||
<td width="10"> </td> | |||
<td>Change the user full name field finger information</td> | |||
</tr> | |||
<tr> | |||
<td>chgrp</td> | |||
<td width="10"> </td> | |||
<td>Changes the group ownership of files.</td> | |||
</tr> | |||
<tr> | |||
<td>chown</td> | |||
<td width="10"> </td> | |||
<td>Change the owner of file(s ) to another user.</td> | |||
</tr> | |||
<tr> | |||
<td>chpasswd</td> | |||
<td width="10"> </td> | |||
<td>Update password file in batch.</td> | |||
</tr> | |||
<tr> | |||
<td>chroot</td> | |||
<td width="10"> </td> | |||
<td>Run command or interactive shell with special root directory.</td> | |||
</tr> | |||
<tr> | |||
<td>chsh</td> | |||
<td width="10"> </td> | |||
<td>Change the login shell.</td> | |||
</tr> | |||
<tr> | |||
<td>edquota</td> | |||
<td width="10"> </td> | |||
<td>Used to edit user or group quotas. This program uses the vi editor to edit the quota.user and quota.group files. If the environment variable EDITOR is set to emacs, the emacs editor will be used. Type "export EDITOR=emacs" to set that variable.</td> | |||
</tr> | |||
<tr> | |||
<td>faillog</td> | |||
<td width="10"> </td> | |||
<td>Examine faillog and set login failure limits.</td> | |||
</tr> | |||
<tr> | |||
<td>finger</td> | |||
<td width="10"> </td> | |||
<td>See what users are running on a system.</td> | |||
</tr> | |||
<tr> | |||
<td>gpasswd</td> | |||
<td width="10"> </td> | |||
<td>Administer the /etc/group file.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>groupadd</strong></td> | |||
<td width="10"> </td> | |||
<td>Create a new group.</td> | |||
</tr> | |||
<tr> | |||
<td>grpck</td> | |||
<td width="10"> </td> | |||
<td>Verify the integrity of group files.</td> | |||
</tr> | |||
<tr> | |||
<td>grpconv</td> | |||
<td width="10"> </td> | |||
<td>Creates /etc/gshadow from the file /etc/group which converts to shadow passwords.</td> | |||
</tr> | |||
<tr> | |||
<td>grpunconv</td> | |||
<td width="10"> </td> | |||
<td>Uses the files /etc/passwd and /etc/shadow to create /etc/passwd, then deletes /etc/shadow which converts from shadow passwords.</td> | |||
</tr> | |||
<tr> | |||
<td>groupdel</td> | |||
<td width="10"> </td> | |||
<td>Delete a group.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>groupmod</strong></td> | |||
<td width="10"> </td> | |||
<td>Modify a group.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>groups</strong></td> | |||
<td width="10"> </td> | |||
<td>Print the groups a user is in</td> | |||
</tr> | |||
<tr> | |||
<td><strong>id</strong></td> | |||
<td width="10"> </td> | |||
<td>Print real and effective user id and group ids.</td> | |||
</tr> | |||
<tr> | |||
<td>last</td> | |||
<td width="10"> </td> | |||
<td>Display the last users logged on and how long.</td> | |||
</tr> | |||
<tr> | |||
<td>lastb</td> | |||
<td width="10"> </td> | |||
<td>Shows failed login attempts. This command requires the file /var/log/btmp to exist in order to work. Type "touch /var/log/btmp" to begin logging to this file.</td> | |||
</tr> | |||
<tr> | |||
<td>lastcomm</td> | |||
<td width="10"> </td> | |||
<td>Display information about previous commands in reverse order. Works only if process accounting is on.</td> | |||
</tr> | |||
<tr> | |||
<td>lastlog</td> | |||
<td width="10"> </td> | |||
<td>Formats and prints the contents of the last login.</td> | |||
</tr> | |||
<tr> | |||
<td>logname</td> | |||
<td width="10"> </td> | |||
<td>Print user's login name.</td> | |||
</tr> | |||
<tr> | |||
<td>newgrp</td> | |||
<td width="10"> </td> | |||
<td>Lets a suer log in to a new group.</td> | |||
</tr> | |||
<tr> | |||
<td>newusers</td> | |||
<td width="10"> </td> | |||
<td>Update and create newusers in batch.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>passwd</strong></td> | |||
<td width="10"> </td> | |||
<td>Set a user's pass word.</td> | |||
</tr> | |||
<tr> | |||
<td>pwck</td> | |||
<td width="10"> </td> | |||
<td>Verify integrity of password files.</td> | |||
</tr> | |||
<tr> | |||
<td>pwconv</td> | |||
<td width="10"> </td> | |||
<td>Convert to and from shadow passwords and groups.</td> | |||
</tr> | |||
<tr> | |||
<td>quota</td> | |||
<td width="10"> </td> | |||
<td>Display users' limits and current disk usage.</td> | |||
</tr> | |||
<tr> | |||
<td>quotaoff</td> | |||
<td width="10"> </td> | |||
<td>Turns system quotas off.</td> | |||
</tr> | |||
<tr> | |||
<td>quotaon</td> | |||
<td width="10"> </td> | |||
<td>Turns system quotas on.</td> | |||
</tr> | |||
<tr> | |||
<td>quotacheck</td> | |||
<td width="10"> </td> | |||
<td>Used to check a filesystem for usage, and update the quota.user file.</td> | |||
</tr> | |||
<tr> | |||
<td>repquota</td> | |||
<td width="10"> </td> | |||
<td>Lists a summary of quota information on filesystems.</td> | |||
</tr> | |||
<tr> | |||
<td>sa</td> | |||
<td width="10"> </td> | |||
<td>Generates a summary of information about users' processes that are stored in the /var/log/pacct file.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>smbclient</strong></td> | |||
<td width="10"> </td> | |||
<td>Works similar to an ftp client enabling the user to transfer files to and from a windows based computer.</td> | |||
</tr> | |||
<tr> | |||
<td>smbmount</td> | |||
<td width="10"> </td> | |||
<td>Allows a shared directory on a windows machine to be mounted on the Linux machine.</td> | |||
</tr> | |||
<tr> | |||
<td>smbpasswd</td> | |||
<td width="10"> </td> | |||
<td>Program to change users passwords for samba.</td> | |||
</tr> | |||
<tr> | |||
<td>su</td> | |||
<td width="10"> </td> | |||
<td>Ex: su mark - Effect: changes the user to mark, If not root will need marks password.</td> | |||
</tr> | |||
<tr> | |||
<td>sulogin</td> | |||
<td width="10"> </td> | |||
<td>Single user login.</td> | |||
</tr> | |||
<tr> | |||
<td>ulimit</td> | |||
<td width="10"> </td> | |||
<td>A bash builtin command for setting the processes a user can run.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>useradd</strong></td> | |||
<td width="10"> </td> | |||
<td>Create a new user or update default new user information.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>userdel</strong></td> | |||
<td width="10"> </td> | |||
<td>Delete a user account and related files.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>usermod</strong></td> | |||
<td width="10"> </td> | |||
<td>Modify a user account.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>users</strong></td> | |||
<td width="10"> </td> | |||
<td>Print the user names of users currently logged in.</td> | |||
</tr> | |||
<tr> | |||
<td>utmpdump</td> | |||
<td width="10"> </td> | |||
<td>Used for debugging.</td> | |||
</tr> | |||
<tr> | |||
<td>vigr</td> | |||
<td width="10"> </td> | |||
<td>Edit the password or group files.</td> | |||
</tr> | |||
<tr> | |||
<td>vipw</td> | |||
<td width="10"> </td> | |||
<td>Edit the password or group files.</td> | |||
</tr> | |||
<tr> | |||
<td>w</td> | |||
<td width="10"> </td> | |||
<td>Display users logged in and what they are doing.</td> | |||
</tr> | |||
<tr> | |||
<td>wall</td> | |||
<td width="10"> </td> | |||
<td>Send a message to everybody's terminal.</td> | |||
</tr> | |||
<tr> | |||
<td>who</td> | |||
<td width="10"> </td> | |||
<td>Display the users logged in.</td> | |||
</tr> | |||
<tr> | |||
<td>whoami</td> | |||
<td width="10"> </td> | |||
<td>Print effective user id.</td> | |||
</tr> | |||
</tbody> | |||
</table> | |||
</html> |
Revision as of 19:38, 5 August 2016
Allow port 3306 to be accessible externally
edit the /etc/mysql/my.cnf # the bind address which is usurally 127.0.0.1
Installing Bittorrent Sync
sh -c 'echo "deb http://linux-packages.getsync.com/btsync/deb btsync non-free" > /etc/apt/sources.list.d/btsync.list' wget -qO - http://linux-packages.getsync.com/btsync/key.asc | sudo apt-key add - sudo apt-get update sudo apt-get install btsync
Autostart Bitsync: add "Service btsync start" to the /etc/rc.local file
== How to Use BT sync:== There’s already a few great tutorials about setting up Btsync in Ubuntu around the web. And below is a brief how-to: First create a shared folder and set its permissions, here I created a folder shared_folder under the root of my current user: cd && mkdir shared_folder sudo chown YOUR_USER:btsync shared_folder sudo chmod 2775 shared_folder sudo usermod -a -G btsync YOUR_USER Then start the btsync service: sudo service btsync start You may replace start with stop, enable, disable, or status to control Btsync. Now go to localhost:8888 in your web browser and add the previous created folder: Finally share the link, key, or QRcode with your friends and enjoy!
GuruPlug Server
Ip is set to DHCP at boot by a script. so even if you edit the /etc/interface file and add Static ip's it will change on reboot. In order to fix this this you need to edit the /etc/ifplugd/ifplugd.action file and # dhclient3 -e IF_METRIC=100 -pf /var/run/dhclient.eth0.pid -lf /var/lib/dhcp3/dhclient.eth0.leases eth0 line
command to Show all users:
cat /etc/passwd
lastlog
ac | Print statistics about users' connect time. | |
accton | Turn on accounting of processes. To turn it on type "accton /var/log/pacct". | |
adduser | Ex: adduser mark - Effect: Adds a user to the system named mark | |
chage | Used to change the time the user's password will expire. | |
chfn | Change the user full name field finger information | |
chgrp | Changes the group ownership of files. | |
chown | Change the owner of file(s ) to another user. | |
chpasswd | Update password file in batch. | |
chroot | Run command or interactive shell with special root directory. | |
chsh | Change the login shell. | |
edquota | Used to edit user or group quotas. This program uses the vi editor to edit the quota.user and quota.group files. If the environment variable EDITOR is set to emacs, the emacs editor will be used. Type "export EDITOR=emacs" to set that variable. | |
faillog | Examine faillog and set login failure limits. | |
finger | See what users are running on a system. | |
gpasswd | Administer the /etc/group file. | |
groupadd | Create a new group. | |
grpck | Verify the integrity of group files. | |
grpconv | Creates /etc/gshadow from the file /etc/group which converts to shadow passwords. | |
grpunconv | Uses the files /etc/passwd and /etc/shadow to create /etc/passwd, then deletes /etc/shadow which converts from shadow passwords. | |
groupdel | Delete a group. | |
groupmod | Modify a group. | |
groups | Print the groups a user is in | |
id | Print real and effective user id and group ids. | |
last | Display the last users logged on and how long. | |
lastb | Shows failed login attempts. This command requires the file /var/log/btmp to exist in order to work. Type "touch /var/log/btmp" to begin logging to this file. | |
lastcomm | Display information about previous commands in reverse order. Works only if process accounting is on. | |
lastlog | Formats and prints the contents of the last login. | |
logname | Print user's login name. | |
newgrp | Lets a suer log in to a new group. | |
newusers | Update and create newusers in batch. | |
passwd | Set a user's pass word. | |
pwck | Verify integrity of password files. | |
pwconv | Convert to and from shadow passwords and groups. | |
quota | Display users' limits and current disk usage. | |
quotaoff | Turns system quotas off. | |
quotaon | Turns system quotas on. | |
quotacheck | Used to check a filesystem for usage, and update the quota.user file. | |
repquota | Lists a summary of quota information on filesystems. | |
sa | Generates a summary of information about users' processes that are stored in the /var/log/pacct file. | |
smbclient | Works similar to an ftp client enabling the user to transfer files to and from a windows based computer. | |
smbmount | Allows a shared directory on a windows machine to be mounted on the Linux machine. | |
smbpasswd | Program to change users passwords for samba. | |
su | Ex: su mark - Effect: changes the user to mark, If not root will need marks password. | |
sulogin | Single user login. | |
ulimit | A bash builtin command for setting the processes a user can run. | |
useradd | Create a new user or update default new user information. | |
userdel | Delete a user account and related files. | |
usermod | Modify a user account. | |
users | Print the user names of users currently logged in. | |
utmpdump | Used for debugging. | |
vigr | Edit the password or group files. | |
vipw | Edit the password or group files. | |
w | Display users logged in and what they are doing. | |
wall | Send a message to everybody's terminal. | |
who | Display the users logged in. | |
whoami | Print effective user id. |