Hello,
I've got the following script that I want to run every time a user logs in
to the Samba server, whether it be from a mapped share or by opening a telnet
session into the server and logging in that way.
Here's the script:
#!/bin/sh
DOMAIN=`echo $USER | awk -F_ '{print $1}'`
USERNAME=`echo $USER | awk -F_ '{print $2}'`
if [ $DOMAIN = "MA" ]; then
if [ -d /home/$DOMAIN/$USERNAME ]; then
continue
else
mkdir /home/$DOMAIN/$USERNAME
fi
fi
It's not the prettiest, but it does what I want, which is create the users
home directory if it doesn't exist.
Now, I know there were a couple of options in the smb.conf file for doing this,
but I can't get it to cooperate. Can anyone help, or offer an alternate
means?
Thanks and regards,
Scott Wrosch
desk 248.333.7700 x227
pager 248.806.7657
text 2488067657@paging.acswireless.com
email swrosch@marketingassociates.com
?
"Our greatest glory is not in never falling
but in rising every time we fall."?-- Confucius
Hello,
I've got the following script that I want to run every time a user logs in
to the Samba server, whether it be from a mapped share or by opening a telnet
session into the server and logging in that way.
Here's the script:
#!/bin/sh
DOMAIN=`echo $USER | awk -F_ '{print $1}'`
USERNAME=`echo $USER | awk -F_ '{print $2}'`
if [ $DOMAIN = "MA" ]; then
if [ -d /home/$DOMAIN/$USERNAME ]; then
continue
else
mkdir /home/$DOMAIN/$USERNAME
fi
fi
It's not the prettiest, but it does what I want, which is create the users
home directory if it doesn't exist.
Now, I know there were a couple of options in the smb.conf file for doing this,
but I can't get it to cooperate. Can anyone help, or offer an alternate
means?
Also, a quick little bit about the set up. Obviously I'm on a domain. The
Samba server is logged into the domain, however it is not a controller.
Naturally, I'm using winbind as well. It's running on a RedHat 7.3
server, and I'm running Samba 2.2.6. It's a small server, but there are
multiple users who will be using it.
Thanks and regards,
Scott Wrosch
desk 248.333.7700 x227
pager 248.806.7657
text 2488067657@paging.acswireless.com
email swrosch@marketingassociates.com
?
"Our greatest glory is not in never falling
but in rising every time we fall."?-- Confucius
You'll have to forgive me, as I'm still a bit of a noob when it comes to
Samba and many aspects of Linux, but how do I use it? I'm sure it's
something stupidly simple, but I'm not sure where to begin.
Thanks,
Scott
-----Original Message-----
From: Samba [mailto:Samba@guidemail.com]
Sent: Tuesday, October 29, 2002 10:48 AM
To: Scott Wrosch; samba@samba.org
Subject: RE: [Samba] Script question
Have you looked at pam_mkhomedir ?? It will create home directories
automatically. And you can do this with any pam-enabled service, i.e.
telnet, ftp, samba.
Josh
-----Original Message-----
From: Scott Wrosch [mailto:swrosch@MarketingAssociates.com]
Sent: Tuesday, October 29, 2002 9:30 AM
To: samba@samba.org
Subject: [Samba] Script question
Hello,
I've got the following script that I want to run every time a user logs in
to the Samba server, whether it be from a mapped share or by opening a
telnet session into the server and logging in that way.
Here's the script:
#!/bin/sh
DOMAIN=`echo $USER | awk -F_ '{print $1}'`
USERNAME=`echo $USER | awk -F_ '{print $2}'`
if [ $DOMAIN = "MA" ]; then
if [ -d /home/$DOMAIN/$USERNAME ]; then
continue
else
mkdir /home/$DOMAIN/$USERNAME
fi
fi
It's not the prettiest, but it does what I want, which is create the users
home directory if it doesn't exist.
Now, I know there were a couple of options in the smb.conf file for doing
this, but I can't get it to cooperate. Can anyone help, or offer an
alternate means?
Thanks and regards,
Scott Wrosch
desk 248.333.7700 x227
pager 248.806.7657
text 2488067657@paging.acswireless.com
email swrosch@marketingassociates.com
?
"Our greatest glory is not in never falling
but in rising every time we fall."?-- Confucius
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Start with 'man pam'
Or you can look here:
http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/
HTH
Josh
-----Original Message-----
From: Scott Wrosch [mailto:swrosch@MarketingAssociates.com]
Sent: Tuesday, October 29, 2002 9:51 AM
To: Samba; samba@samba.org
Subject: RE: [Samba] Script question
You'll have to forgive me, as I'm still a bit of a noob when it comes to
Samba and many aspects of Linux, but how do I use it? I'm sure it's
something stupidly simple, but I'm not sure where to begin.
Thanks,
Scott
-----Original Message-----
From: Samba [mailto:Samba@guidemail.com]
Sent: Tuesday, October 29, 2002 10:48 AM
To: Scott Wrosch; samba@samba.org
Subject: RE: [Samba] Script question
Have you looked at pam_mkhomedir ?? It will create home directories
automatically. And you can do this with any pam-enabled service, i.e.
telnet, ftp, samba.
Josh
-----Original Message-----
From: Scott Wrosch [mailto:swrosch@MarketingAssociates.com]
Sent: Tuesday, October 29, 2002 9:30 AM
To: samba@samba.org
Subject: [Samba] Script question
Hello,
I've got the following script that I want to run every time a user logs in
to the Samba server, whether it be from a mapped share or by opening a
telnet session into the server and logging in that way.
Here's the script:
#!/bin/sh
DOMAIN=`echo $USER | awk -F_ '{print $1}'`
USERNAME=`echo $USER | awk -F_ '{print $2}'`
if [ $DOMAIN = "MA" ]; then
if [ -d /home/$DOMAIN/$USERNAME ]; then
continue
else
mkdir /home/$DOMAIN/$USERNAME
fi
fi
It's not the prettiest, but it does what I want, which is create the users
home directory if it doesn't exist.
Now, I know there were a couple of options in the smb.conf file for doing
this, but I can't get it to cooperate. Can anyone help, or offer an
alternate means?
Thanks and regards,
Scott Wrosch
desk 248.333.7700 x227
pager 248.806.7657
text 2488067657@paging.acswireless.com
email swrosch@marketingassociates.com
?
"Our greatest glory is not in never falling
but in rising every time we fall."?-- Confucius
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Have you looked at pam_mkhomedir ?? It will create home directories
automatically. And you can do this with any pam-enabled service, i.e.
telnet, ftp, samba.
Josh
-----Original Message-----
From: Scott Wrosch [mailto:swrosch@MarketingAssociates.com]
Sent: Tuesday, October 29, 2002 9:30 AM
To: samba@samba.org
Subject: [Samba] Script question
Hello,
I've got the following script that I want to run every time a user logs in
to the Samba server, whether it be from a mapped share or by opening a
telnet session into the server and logging in that way.
Here's the script:
#!/bin/sh
DOMAIN=`echo $USER | awk -F_ '{print $1}'`
USERNAME=`echo $USER | awk -F_ '{print $2}'`
if [ $DOMAIN = "MA" ]; then
if [ -d /home/$DOMAIN/$USERNAME ]; then
continue
else
mkdir /home/$DOMAIN/$USERNAME
fi
fi
It's not the prettiest, but it does what I want, which is create the users
home directory if it doesn't exist.
Now, I know there were a couple of options in the smb.conf file for doing
this, but I can't get it to cooperate. Can anyone help, or offer an
alternate means?
Thanks and regards,
Scott Wrosch
desk 248.333.7700 x227
pager 248.806.7657
text 2488067657@paging.acswireless.com
email swrosch@marketingassociates.com
?
"Our greatest glory is not in never falling
but in rising every time we fall."?-- Confucius
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba
Thanks Josh! That should do the trick. I found exactly what I was looking for
at that link.
Thanks!
Scott
-----Original Message-----
From: Samba [mailto:Samba@guidemail.com]
Sent: Tuesday, October 29, 2002 10:57 AM
To: Scott Wrosch; samba@samba.org
Subject: RE: [Samba] Script question
Start with 'man pam'
Or you can look here:
http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/
HTH
Josh
-----Original Message-----
From: Scott Wrosch [mailto:swrosch@MarketingAssociates.com]
Sent: Tuesday, October 29, 2002 9:51 AM
To: Samba; samba@samba.org
Subject: RE: [Samba] Script question
You'll have to forgive me, as I'm still a bit of a noob when it comes to
Samba and many aspects of Linux, but how do I use it? I'm sure it's
something stupidly simple, but I'm not sure where to begin.
Thanks,
Scott
-----Original Message-----
From: Samba [mailto:Samba@guidemail.com]
Sent: Tuesday, October 29, 2002 10:48 AM
To: Scott Wrosch; samba@samba.org
Subject: RE: [Samba] Script question
Have you looked at pam_mkhomedir ?? It will create home directories
automatically. And you can do this with any pam-enabled service, i.e.
telnet, ftp, samba.
Josh
-----Original Message-----
From: Scott Wrosch [mailto:swrosch@MarketingAssociates.com]
Sent: Tuesday, October 29, 2002 9:30 AM
To: samba@samba.org
Subject: [Samba] Script question
Hello,
I've got the following script that I want to run every time a user logs in
to the Samba server, whether it be from a mapped share or by opening a
telnet session into the server and logging in that way.
Here's the script:
#!/bin/sh
DOMAIN=`echo $USER | awk -F_ '{print $1}'`
USERNAME=`echo $USER | awk -F_ '{print $2}'`
if [ $DOMAIN = "MA" ]; then
if [ -d /home/$DOMAIN/$USERNAME ]; then
continue
else
mkdir /home/$DOMAIN/$USERNAME
fi
fi
It's not the prettiest, but it does what I want, which is create the users
home directory if it doesn't exist.
Now, I know there were a couple of options in the smb.conf file for doing
this, but I can't get it to cooperate. Can anyone help, or offer an
alternate means?
Thanks and regards,
Scott Wrosch
desk 248.333.7700 x227
pager 248.806.7657
text 2488067657@paging.acswireless.com
email swrosch@marketingassociates.com
?
"Our greatest glory is not in never falling
but in rising every time we fall."?-- Confucius
--
To unsubscribe from this list go to the following URL and read the
instructions: http://lists.samba.org/mailman/listinfo/samba