Skip to content

Instantly share code, notes, and snippets.

View Mouad-BGD's full-sized avatar

Mouad BOUGDOUR Mouad-BGD

View GitHub Profile
@Mouad-BGD
Mouad-BGD / add users to vstftp
Created June 5, 2012 18:55
Linux users and vsftp
Yes, it is this simple, creating a new user for ftp access in vsftpd is as easy as creating a new valid linux system user.
# useradd username
# passwd username
Disable SSH access for FTP users
The default user creation script will give a user the /bin/bash shell, which can be a little too powerful. If you don't want your users logging into your server via SSH, we need to know how to block this access. If you change the shell to /bin/false, the users will only be able to login via ftp or mail if you have that setup. Here is how to modify your users:
usermod -s /sbin/nologin username
html
----
<div class="slideshow">
<h1>Text</h1>
<input type="button" value="Hello" />
</div>
css
---
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Template</title>
<meta name="description" content="The HTML5 Template">
<link rel="stylesheet" href="css/styles.css?v=1.0">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
$(window).resize(function() { if ($(document).width() < 720) toggleImagesSlides()
else toggleImagesSlides();
});
toggleImagesSlides(){
if they are already loaded just toggle thier visbility else load them [via ajax]
Multi-language
Language icons
Translation Management
translation table
;your costume library to js folder and css folder
libraries[flex_slider][name] = Flex Slider
libraries[flex_slider][description] = Slider image plugin for jquery.
libraries[flex_slider][js][0][file] = jquery.flexslider.js
libraries[flex_slider][js][0][options][weight] = -19
libraries[flex_slider][css][0][file] = flexslider.css
libraries[flex_slider][css][0][options][weight] = -19
<ul>
<li>Line 1</li>
<li class="disabled">Line 2</li>
</ul>
CSS
---
ul li:hover{
color:red;
@Mouad-BGD
Mouad-BGD / drupal
Created June 15, 2012 15:37
Reffernce website
http://denver2012.drupal.org/program/sessions drupal videos
If you're using vsftpd, you might find that you want to create accounts with access to FTP, but not to the shell (no ssh access, for example). So you might naively want to define the user's shell as /bin/false in /etc/passwd.
Unfortunately, that will block the user's access to vsftp as well as ssh. Instead, under RHEL and CentOS, you should use /sbin/nologin, which will block the ssh access, but continue to allow FTP access.
Even better, as I saw in one forum, you might make a symlink to /sbin/nologin and call it /sbin/ftp_only. You'll have to add /sbin/ftp_only to /etc/shells so it will be recognized as a valid shell. But the advantage here is that you'll be able to distinguish your FTP-only accounts from accounts that have been disabled for one reason or another.
@Mouad-BGD
Mouad-BGD / samba
Created June 19, 2012 17:11
Linux
1- install samba
yum install
2- install the gui
yum install
3- create samba users and password
smbpasswd -a username
4- modify the /etc/samba/smb.config
workgroup
5- modify firwall and ICMP filters