Logon scripts for Linux & Windows Client on Windows2003 AD

5 pts.
Tags:
Active Directory
Linux
Microsoft Exchange 2003
Microsoft Windows
Hi I need some help for my problem as I'm very new to this I doing this setup for a school environment with many students n teachers account in a w2k3 AD, Student accounts are placed into Students OU and Teachers accounts in Teachers OU. Each acount has its logon script either for student or teacher. I've integrated a Linux client into this network and I need to put a similar logon script for students n teachers when they logon to the network using the linux client. How can this be done to solve my problem here. The logon script is basically to create network drives to folders the users need to access for work. Students and teachers accesses different folder and should not be inter accessible by either groups. Thanks in advance. Hope some guru can help me out here Regards Jeremy

Answer Wiki

Thanks. We'll let you know when a new response is added.

First you need to configure both Samba (smb.conf) and MIT Kerberos (krb5.conf) services. Next type the following command:

# net ads join –UAdministrator

You will be prompted for domain admin password. Above single command is use to join Active Directory domain from Linux system. It should work with FreeBSD system too.

Now that the machine is on AD you need the linux login scripts or cron job.

The steps to make it work:

*

Get the samba version for your platform from here
*

Install samba on your linux box. It will be installed under /opt/samba by default.
*

Edit /etc/samba/smb.conf, and add the section for the directory you want to share to windows. For example, if you want to share your /opt/spike directory to windows, then you need to add the following section into /etc/samba/smb.conf
o

[spike]
comment = Shared Files
path = /opt/spike/
writeable = yes
browseable = yes
guest ok = no
printable = no

*

Add samba password by using the following command:
o

$ smbpasswd -a <username> — this adds a user and changes their password
*

Export you directory file-system. (For the above example, you can either export /opt or /opt/spike.)
*

Go to windows box, open “My Computer” –> “Tools” –> “Map Network Dirve…”, then choose a dirve name (eg. e:/f:/g:/…/z:) and map to \\server\share (eg. \\gambia\spike)
*

Use the samba user you added in step 4 to connect to \\server\share.
*

/sbin/chkconfig –add smb to setup samba as a service.

Some useful Samba commands:

*

$ testparm /etc/samba/smb.conf — check an smb.conf for internal correctness
*

$ smbclient -L //{netbios name of server}
o

— “netbios name” gets defined in the gloal section of the smb.conf file.

Some simple diagnostic approaches for samba problem:

*

Check if can ping the linux machine from windows
*

Check if the the linux file system be exported
*

Check if smb service running.
*

Restart the smb server using /etc/init.d/smb stop and /etc/init.d/smb start
*

Try the above useful samba commands
*

Rerun “smbpasswd -a <username>” just in case the user was deleted.
*

A universal way: compare its configuration with other machine whose samba works properly.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following