Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - adrian

Pages: [1]
1
Hi guys
Quote
eBox administration -> Objects
Generate a new object i.e. "local_pc"
Add all your PCs as members to this object

I get the error
Quote
Invalid value for network address:
when I try to add my pc's ip address.

Any ideas??

Thanks again

2
Hi tbg58

Your script looks like what I have been looking for.

I have 20 windows xp pro users and 5 ubuntu users.

I saved the following code: cscript \\myserver\netlogon\logon.vbs into logon.bat and copied your vbs script above into logon.vbs and saved them both into /home/samba/netlogon directory.

logon.vbs:
Code: [Select]
'First make sure all variables are dimensioned.
'This isn't necessary for functionality; it's for coding discipline only.
Option Explicit
'dimension all our variables
dim objNetwork
dim strDriveLetter, strRemotePath, strUser, strGrp
dim strGroupADSPath, strUserADSPath, grp

'This script will use the MapNetworkDrive method
'for each network drive mapped.

'We'll be using the Wscript.Network Object to enumerate the user as well as to map drives.
'We only need to instantiate it once at the beginning.
Set objNetwork = Wscript.CreateObject("Wscript.Network")

'First let's get the user name since we'll use it for mapping the home directory
'as well as checking group memberships. 
strUser = objNetwork.UserName

'In just about every network at least two drives are mapped:
'One for the user's home directory, and one for an organizational public share.
'We'll map those first since they don't depend on group memberships.

'User Drive to H:
strDriveLetter = "H:"
strRemotePath = "\\nebula"
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath & "\" & strUser

'PublicShare Drive to P:
strDriveLetter = "P:"
strRemotePath = "\\nebula\public"
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath

'next we'll enumerate groups and map drives for specific departmental memberships
'The code to check for memberships and map the drives is in a subroutine called IsMember.
'All we have to do is copy the same block over again for each group membership we want to check.
'The block only needs to set the string values for the group name, the desired drive letter, and the share path.
'Then it calls the IsMember subroutine down below.

'I: for members of Accounts
strGrp="Accounts"
strDriveLetter = "i:"
strRemotePath = "\\nebula\Accounts"
IsMember

'J: for members of SYSBackup
strGrp="SYSBackup"
strDriveLetter = "j:"
strRemotePath = "\\nebula\SYSBackup"
IsMember

'K: for members of GCAdmin
strGrp="GCAdmin"
strDriveLetter = "k:"
strRemotePath = "\\nebula\GCAdmin"
IsMember

'L: for members of GCSat
strGrp="GCSat"
strDriveLetter = "l:"
strRemotePath = "\\nebula\GCSat"
IsMember

'M: for members of Webmaster
strGrp="Webmaster"
strDriveLetter = "m:"
strRemotePath = "\\nebula\Webmaster"
IsMember

'N: for members of Ngami
strGrp="Ngami"
strDriveLetter = "n:"
strRemotePath = "\\nebula\Ngami"
IsMember

'O: for members of Okavango
strGrp="Okavango"
strDriveLetter = "o:"
strRemotePath = "\\nebula\Okavango"
IsMember

'R: for members of groupr
'strGrp="groupr"
'strDriveLetter = "R:"
'strRemotePath = "\\yourservername\grouprpvt"
'IsMember

'Repeat for as many private groups and their respective enumerated shares as you wish.

'We're done with the login script.
'Let's tidy up variables first to make sure we're not leaving anything behind.
objNetwork = ""
strDriveLetter = ""
strRemotePath = ""
strUser = ""
strGrp = ""
strGroupADSPath = ""
strUserADSPath = ""
grp = ""
'That's all.  Close the script processor.
wscript.quit

sub IsMember
'set the directory service path to enumerate the group
strGroupADSPath = "WinNT://oeb/" & strGrp & ",group"
'poll the PDC for the group
set grp = GetObject(strGroupADSPath)
'set the user directory service path to enumerate the user
strUserADSPath = "WinNT://oeb/" & strUser
'Check membership in the group. 
If (grp.IsMember(strUserADSPath)) Then
'map the drive
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
End If
'clean up variables for next group check.
strGrp = ""
strDriveLetter = ""
strRemotePath = ""
'Rinse, lather and repeat this code as many times as needed.
End sub

smb.conf file is set with "logon script = logon.bat"

Now, the logon.vbs does not seem to be loading. Is there anything else I can try, to get this working.

Thanks again

3
Solved!!

I reinstalled squirrelmail then linked it to the sites-enabled directory with the command:

sudo ln -s /etc/apache2/sites-available/squirrelmail /etc/apache2/sites-enabled/squirrelmail

This allowed me to edit the "It works" page and have a link to the squirrelmail login page.

Thanks again.

4
Hey dragonslayr.

I used the HowTO from ebox-platform. http://trac.ebox-platform.com/wiki/Document/HowTo/InstallWebmail

Im not sure how to change the apache2 config file to redirect me to a plain html file with only my logo and a link to the squirrelmail login page. On the apache site now, will let you know how it goes.

Thanks again

5
Hey guys.

I love ebox, its made setting up a PDC and mailserver so much easier and saved me hours of development. Im very new to linux but I getting there.

For my mail server, I managed to add squirrelmail, and got it working fine. What I would like to do is change the first page I get, which is the squirrelmail login page at http://webmail.mydomain.com to a simple html page with our company logo and services and a link to the webmail login page.

Hope thats clear. Thanks again

Pages: [1]