Linux User Setup
The following simple howto walks you through the steps required to setup a
group, and
users on your linux server.
Once you have the group and
users setup, it steps
you through configuring samba
and the samba server.
The deamon for running samba is
smbd
(/etc/init.d/smbd) and will need to be restarted once the configuration has been changed.
Have fun!
Users and Groups
- Add the group, web.
This will be the main group
for accessing web content and cvs.
groupadd web
- Add the users joe, fred and tomcat. Joe and Fred will have the
group, 'users' as their prime group
useradd -g users joe
useradd -g users fred
useradd -g web tomcat
- Set the passwords for these users, they should be the same as their Workstation passwords.
This will allow the samba shares to work without having to enter a password all the time.
passwd joe
passwd fred
passwd tomcat
Public Folders
- We will be creating a web folder for access by all
users of the web
group.
This will house all of the web content.
mkdir /web
chown tomcat.web /web
chmod 775 /web
Setting Up Samba Users
- Ensure Samba has been
installed by querying the rpm database.
rpm -q samba
- If Samba is installed,
you are good to go. Add the Samba
users joe and fred.
smbpasswd -a joe
smbpasswd -a fred
Setting up Samba
- We will be setting up Samba
to share the tmp and web folders, as well as the users
home directories.
In order to do this we need to edit the smb.conf
file located at /etc/samba/smb.conf
workgroup = aWorkgroup
- Set the server description
server string = Caterham Samba
- Allow access only from local subnet and localhost.
hosts allow = 192.168.0. 127.
- Create a Samba share for the tmp folder
[tmp]
comment = Temporary file space
path = /tmp
read only = no
public = yes
- Create a samba share for the web folder
[web]
comment = Apache Web Content
path = /web
read only = yes
public = yes
write list = @web
[/etc/init.d]$ ./smbd restart