


| Mount Pt | Type | Size | Primary Partition |
|---|---|---|---|
| /boot | ext3 | 100 MB | Yes |
| n.a. | swap | 1000 MB | No |
| / | ext3 | 10000 MB | No |
| /home | ext3 | 20000 MB | No |
| /data | ext3 | 20000 MB | No |



Add a new line at the end: ALL: ALL
sendmail: 127.0.0.1 sshd: 128.143.46. 128.143.47. 128.143.2.
#
# sample smb.conf file for this lab
#
# use your own name for the workgroup and netbios name ex: Fred_Flintstone
workgroup = myname
netbios name = myname
# SAMBA doesn't use hosts.allow for access. You can limit it to this
# building with the next line
#
hosts allow = 128.143.46. 128.143.47. 127.0.0.1
#
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
[homes]
comment = Home Directories
browseable = no
writable = yes
[data]
path=/data
comment = group data storage
directory mask = 0770
create mask = 0770
browseable = yes
writable = yes
[netlogon]
comment = Network Logon Service
path = /home/netlogon
writable = no
share modes = no
browseable = no
guest ok = no
Start SAMBA with cd /data mkdir projects chmod 6770 projects chgrp users projectsNow anyone who is a valid SAMBA user and is in the default group "users" can create, modify, and delete files in /data/projects. They also cannot arbitrarily put files or directories in /data. That is reserved for the admin users. This keeps the top level shared directory clean. The users just need to map this "share" as described below in the section "TEST SAMBA from Windows".
[root@newton root]# chkconfig --list | grep on | sort acpid 0:off 1:off 2:off 3:on 4:on 5:on 6:off anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off apmd 0:off 1:off 2:on 3:on 4:on 5:on 6:off atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off cpuspeed 0:off 1:on 2:on 3:on 4:on 5:on 6:off crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off httpd 0:off 1:off 2:off 3:on 4:off 5:on 6:off irqbalance 0:off 1:off 2:off 3:on 4:on 5:on 6:off mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off mdmpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off messagebus 0:off 1:off 2:off 3:on 4:on 5:on 6:off microcode_ctl 0:off 1:off 2:off 3:on 4:on 5:on 6:off netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off portmap 0:off 1:off 2:off 3:on 4:on 5:on 6:off random 0:off 1:off 2:on 3:on 4:on 5:on 6:off rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off rpcgssd 0:on 1:off 2:off 3:on 4:off 5:on 6:on rpcidmapd 0:on 1:off 2:off 3:on 4:off 5:on 6:on rpcsvcgssd 0:on 1:off 2:off 3:on 4:off 5:on 6:on sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off smb 0:off 1:off 2:off 3:on 4:off 5:off 6:off sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off


#!/bin/sh /usr/bin/yum -R 10 -e 0 -d 0 -y update yum /usr/bin/yum -R 120 -e 0 -d 0 -y update tail /var/log/yum.log | mail -s YUM.your.pc yourid@virginia.eduThis runs yum every night and sends you an email.
useradd -g 100 -u 1378 rtg2t
where
1378 is your own UVa unix uid number.
100 is the default group ID for the "users" group
substitute your UVa email ID for rtg2t
smbpasswd -a rtg2t
setquota rtg2t 4000000 4100000 0 0 /home
SETQUOTA PARAMETERS
rtg2t - the user affected
4000000 means 4 million blocks or 4 Gigabytes space for space soft limit
4100000 is the hard limit
0 is the soft limit for the number of files
0 is the hard limit for the number of files
/home is the volume affected for this user
I could not find a GUI for setting quotas......
or use system-config-users
On a Windows PC, open a cmd window and type:
net use h: \\128.143.46.xx\rtg2t
net use i: \\128.143.46.xx\data
where xx is the end of your IP. Find your IP by typing
on your Linux account:
ifconfig
which prints something like:
eth0 Link encap:Ethernet HWaddr 00:0B:DB:92:9B:DA
inet addr:128.143.34.79 Bcast:128.143.255.255 Mask:255.255.0.0
inet6 addr: 2002:808f:23c4:4:20b:dbff:fe92:9bda/64 Scope:Global
inet6 addr: fec0::4:20b:dbff:fe92:9bda/64 Scope:Site
inet6 addr: fe80::20b:dbff:fe92:9bda/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:111098470 errors:0 dropped:0 overruns:0 frame:0
TX packets:111783140 errors:0 dropped:0 overruns:0 carrier:0
collisions:12010169 txqueuelen:1000
RX bytes:436643027 (416.4 Mb) TX bytes:901386291 (859.6 Mb)
Base address:0xece0 Memory:fe8e0000-fe900000
DocumentRoot "/var/www/html"and typeto DocumentRoot "/home/www/html"
#This permits each user to have web space under /home/yourid/public_html# AllowOverride FileInfo AuthConfig Limit # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec # to# Order allow,deny # Allow from all # ## Order deny,allow # Deny from all # #AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Order allow,deny Allow from all Order deny,allow Deny from all
chmod 710 /home/yourid chgrp apache /home/yourid/ mkdir /home/yourid/public_html chmod -R 6750 /home/yourid/public_html chgrp -R apache /home/yourid/public_html
id:3:initdefault:
net use m: /del net use n: /del net use M: \\server.ip\homes /persistent:yes net use N: \\server.ip\data /persistent:yes pause
When you get the GRUB menu, you can hit the E key to edit the Linux boot command and boot to single user mode and create a new super user account.
I will demonstrate this before you leave. These PC's in this lab (MEC 215) are pretty safe. This is how much armor it takes to physically lock down a server.