Re: [expert] new server, old users

2003-06-11 Thread Kwan Lowe
On Wed, 2003-06-11 at 19:19, Mark Williamson wrote:

> Using the "usermod -p " it will pass the already hashed or md5
> encrypted straight to the new /etc/shadow file, that's not the problem
> with the script..   it's the accuracy of the line
> PASSWD=`grep ${USERNAME}: /etc/shadow | cut -d: -f2`
> (I might have to use a awk line or something here)
> and the other problem is that bash scripts often interpret the "$"
> symbols from the already md5 passwords out of the old /etc/shadow file,
> not sure if that is the case here, as I haven't totally tested the
> script.

You're right...mea culpa mea culpa...
Never used that particular option before.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [expert] new server, old users

2003-06-11 Thread Mark Williamson
On Thu, 2003-06-12 at 04:42, Kwan Lowe wrote:
> On Wed, 2003-06-11 at 11:30, Mark wrote:
> 
> > 
> > if [ "$USERID" -gt "499" ]  && [ "$USERNAME" != "nobody" ] ; then
> > echo groupadd -g ${GROUPID} ${USERNAME}
> > echo useradd -u ${USERID} -g ${GROUPID} -c \"${COMMENT}\" \
> > -d ${USERDIR} -s ${USERSHL} ${USERNAME}
> >  PASSWD=`grep ${USERNAME}: /etc/shadow | cut -d: -f2`
> > echo usermod -p \"$PASSWD\" ${USERNAME}
> > fi
> > done
> 
> It looks like your setting the password to the hash..  Unless you
> replace the new shadow with entries from the old this won't work.

Using the "usermod -p " it will pass the already hashed or md5
encrypted straight to the new /etc/shadow file, that's not the problem
with the script..   it's the accuracy of the line
PASSWD=`grep ${USERNAME}: /etc/shadow | cut -d: -f2`
(I might have to use a awk line or something here)
and the other problem is that bash scripts often interpret the "$"
symbols from the already md5 passwords out of the old /etc/shadow file,
not sure if that is the case here, as I haven't totally tested the
script.

Cheers
Mark


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [expert] new server, old users

2003-06-11 Thread Kwan Lowe
On Wed, 2003-06-11 at 11:30, Mark wrote:

> 
> if [ "$USERID" -gt "499" ]  && [ "$USERNAME" != "nobody" ] ; then
> echo groupadd -g ${GROUPID} ${USERNAME}
> echo useradd -u ${USERID} -g ${GROUPID} -c \"${COMMENT}\" \
>   -d ${USERDIR} -s ${USERSHL} ${USERNAME}
>  PASSWD=`grep ${USERNAME}: /etc/shadow | cut -d: -f2`
> echo usermod -p \"$PASSWD\" ${USERNAME}
> fi
> done

It looks like your setting the password to the hash..  Unless you
replace the new shadow with entries from the old this won't work.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [expert] new server, old users

2003-06-11 Thread Mark
Just thought that I would add a couple of extras to Kwan's script..
But I am not sure if the password thingy works correctly yet maybe
someone will have something better..   anyway
here it is..

#!/bin/bash
   IFS=$'\n'

for item in `cat /etc/passwd`; do
 USERNAME=`echo $item | cut -d: -f1`
 USERID=`echo $item | cut -d: -f3`
 GROUPID=`echo $item | cut -d: -f4`
 COMMENT=`echo $item | cut -d: -f5`
 USERDIR=`echo $item | cut -d: -f6`
 USERSHL=`echo $item | cut -d: -f7`

if [ "$USERID" -gt "499" ]  && [ "$USERNAME" != "nobody" ] ; then
echo groupadd -g ${GROUPID} ${USERNAME}
echo useradd -u ${USERID} -g ${GROUPID} -c \"${COMMENT}\" \
-d ${USERDIR} -s ${USERSHL} ${USERNAME}
 PASSWD=`grep ${USERNAME}: /etc/shadow | cut -d: -f2`
echo usermod -p \"$PASSWD\" ${USERNAME}
fi
done



On Wed, 2003-06-11 at 02:53, Alan Wilter Sousa da Silva wrote:
> Hi!
> 
> Thank you for your script.  I had to do some modifications, as follow:
> 
> #!/bin/bash
> 
> # kwan:x:500:1000:Kwan Lowe:/home/kwan:/bin/bash
> IFS=$'\n'
> 
> for item in `cat /etc/passwd`; do
> USERNAME=`echo $item | cut -d: -f1`
> USERID=`echo $item | cut -d: -f3`
> GROUPID=`echo $item | cut -d: -f4`
> COMMENT=`echo $item | cut -d: -f5`
> USERDIR=`echo $item | cut -d: -f6`
> USERSHL=`echo $item | cut -d: -f7`
> echo groupadd -g ${GROUPID} ${USERNAME}
> echo useradd -u ${USERID} -g ${GROUPID} -c \"${COMMENT}\" -d 
> ${USERDIR} -s ${USERSHL} ${USERNAME}
> done
> 
> Now I wonder how can I do to set password automatically.
> 
> On 9 Jun 2003, Kwan Lowe wrote:
> 
> > On Mon, 2003-06-09 at 19:25, Mark Williamson wrote:
> > > Hi Kwan,
> > >
> > > Nice looking script, but did you try it? But it seems to have problems,
> > > getting the fields mixed up..
> > >
> >
> > Nope, just wrote it on the spot.. Sorry...
> > Lemme see..Try this...
> >
> >
> >
> > #!/bin/bash
> >
> > # kwan:x:500:1000:Kwan Lowe:/home/kwan:/bin/bash
> > IFS=$'\n'
> >
> > for item in `cat /etc/passwd`; do
> > USERNAME=`echo $item | cut -d: -f1`
> > USERID=`echo $item | cut -d: -f3`
> > GROUPID=`echo $item | cut -d: -f4`
> > COMMENT=`echo $item | cut -d: -f5`
> > USERDIR=`echo $item | cut -d: -f6`
> > USERSHL=`echo $item | cut -d: -f7`
> >
> > echo useradd -u ${USERID} -g ${GROUPID} -c ${COMMENT} \
> >  -d ${USERDIR} -s ${USERSHL}
> > ${USERNAME}
> > done
> >
> >
> >
> >
> >


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [expert] new server, old users

2003-06-10 Thread Alan Wilter Sousa da Silva
Hi!

Thank you for your script.  I had to do some modifications, as follow:

#!/bin/bash

# kwan:x:500:1000:Kwan Lowe:/home/kwan:/bin/bash
IFS=$'\n'

for item in `cat /etc/passwd`; do
USERNAME=`echo $item | cut -d: -f1`
USERID=`echo $item | cut -d: -f3`
GROUPID=`echo $item | cut -d: -f4`
COMMENT=`echo $item | cut -d: -f5`
USERDIR=`echo $item | cut -d: -f6`
USERSHL=`echo $item | cut -d: -f7`
echo groupadd -g ${GROUPID} ${USERNAME}
echo useradd -u ${USERID} -g ${GROUPID} -c \"${COMMENT}\" -d 
${USERDIR} -s ${USERSHL} ${USERNAME}
done

Now I wonder how can I do to set password automatically.

On 9 Jun 2003, Kwan Lowe wrote:

> On Mon, 2003-06-09 at 19:25, Mark Williamson wrote:
> > Hi Kwan,
> >
> > Nice looking script, but did you try it? But it seems to have problems,
> > getting the fields mixed up..
> >
>
> Nope, just wrote it on the spot.. Sorry...
> Lemme see..Try this...
>
>
>
> #!/bin/bash
>
> # kwan:x:500:1000:Kwan Lowe:/home/kwan:/bin/bash
> IFS=$'\n'
>
> for item in `cat /etc/passwd`; do
> USERNAME=`echo $item | cut -d: -f1`
> USERID=`echo $item | cut -d: -f3`
> GROUPID=`echo $item | cut -d: -f4`
> COMMENT=`echo $item | cut -d: -f5`
> USERDIR=`echo $item | cut -d: -f6`
> USERSHL=`echo $item | cut -d: -f7`
>
> echo useradd -u ${USERID} -g ${GROUPID} -c ${COMMENT} \
>  -d ${USERDIR} -s ${USERSHL}
> ${USERNAME}
> done
>
>
>
>
>

-- 
---
Alan Wilter S. da Silva
---
 Laboratório de Física Biológica
  Instituto de Biofísica Carlos Chagas Filho
   Universidade do Brasil/UFRJ
Rio de Janeiro, Brasil


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [expert] new server, old users

2003-06-09 Thread Kwan Lowe
On Mon, 2003-06-09 at 19:25, Mark Williamson wrote:
> Hi Kwan,
> 
> Nice looking script, but did you try it? But it seems to have problems,
> getting the fields mixed up..
> 

Nope, just wrote it on the spot.. Sorry...
Lemme see..Try this...



#!/bin/bash

# kwan:x:500:1000:Kwan Lowe:/home/kwan:/bin/bash
IFS=$'\n'

for item in `cat /etc/passwd`; do
USERNAME=`echo $item | cut -d: -f1`
USERID=`echo $item | cut -d: -f3`
GROUPID=`echo $item | cut -d: -f4`
COMMENT=`echo $item | cut -d: -f5`
USERDIR=`echo $item | cut -d: -f6`
USERSHL=`echo $item | cut -d: -f7`

echo useradd -u ${USERID} -g ${GROUPID} -c ${COMMENT} \
 -d ${USERDIR} -s ${USERSHL}
${USERNAME}
done




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [expert] new server, old users

2003-06-09 Thread Mark Williamson
Hi Kwan,

Nice looking script, but did you try it? But it seems to have problems,
getting the fields mixed up..

Cheers
Mark

On Mon, 2003-06-09 at 23:14, Kwan Lowe wrote:
> On Mon, 2003-06-09 at 08:39, Alan Wilter Sousa da Silva wrote:
> > Hi List!
> > 
> > I'll set up a new server (MDK 8.0 -> 9.1)  and I would like to
> > keep the same users, but without cloning or copying /home folders.  I
> > know I can copy /etc/passwd file.  But I don't know how to regenerate
> > automatically new /home/users folders (from /etc/skel ?) without using
> > userdrake (or similar).  I would like to keep gid and uid numbers.
> > 
> > Is there a way, how-to, or tip to do it.
> > 
> > Many thanks in advance for any help.
> 
> You could do something like this:
> #!/bin/bash
> 
> 
> for item in `cat /etc/passwd`; do
>  USERNAME=`echo $item | cut -d: -f1`
>  USERID=`echo $item | cut -d: -f3`
>  GROUPID=`echo $item | cut -d: -f4`
>  COMMENT=`echo $item | cut -d: -f5`
>  USERDIR=`echo $item | cut -d: -f6`
>  USERSHL=`echo $item | cut -d: -f7`
> 
>  echo useradd -u ${USERID} -g ${GROUPID} -c ${COMMENT} \
>   -d ${USERDIR} -s ${USERSHL} ${USERNAME}
> done
> 
> 
> Remove the "echo" to actually run the command.
> 
> Let me know if you'd prefer an awk version...
> 
> 
> 
> __
> 
> Want to buy your Pack or Services from MandrakeSoft? 
> Go to http://www.mandrakestore.com
-- 
Mark Williamson <[EMAIL PROTECTED]>
Cyber Essentials


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [expert] new server, old users

2003-06-09 Thread Kwan Lowe
On Mon, 2003-06-09 at 08:39, Alan Wilter Sousa da Silva wrote:
> Hi List!
> 
>   I'll set up a new server (MDK 8.0 -> 9.1)  and I would like to
> keep the same users, but without cloning or copying /home folders.  I
> know I can copy /etc/passwd file.  But I don't know how to regenerate
> automatically new /home/users folders (from /etc/skel ?) without using
> userdrake (or similar).  I would like to keep gid and uid numbers.
> 
> Is there a way, how-to, or tip to do it.
> 
> Many thanks in advance for any help.

You could do something like this:
#!/bin/bash


for item in `cat /etc/passwd`; do
 USERNAME=`echo $item | cut -d: -f1`
 USERID=`echo $item | cut -d: -f3`
 GROUPID=`echo $item | cut -d: -f4`
 COMMENT=`echo $item | cut -d: -f5`
 USERDIR=`echo $item | cut -d: -f6`
 USERSHL=`echo $item | cut -d: -f7`

 echo useradd -u ${USERID} -g ${GROUPID} -c ${COMMENT} \
  -d ${USERDIR} -s ${USERSHL} ${USERNAME}
done


Remove the "echo" to actually run the command.

Let me know if you'd prefer an awk version...


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


[expert] new server, old users

2003-06-09 Thread Alan Wilter Sousa da Silva

Hi List!

I'll set up a new server (MDK 8.0 -> 9.1)  and I would like to
keep the same users, but without cloning or copying /home folders.  I
know I can copy /etc/passwd file.  But I don't know how to regenerate
automatically new /home/users folders (from /etc/skel ?) without using
userdrake (or similar).  I would like to keep gid and uid numbers.

Is there a way, how-to, or tip to do it.

Many thanks in advance for any help.

-- 
---
Alan Wilter S. da Silva
---
 Laboratório de Física Biológica
  Instituto de Biofísica Carlos Chagas Filho
   Universidade do Brasil/UFRJ
Rio de Janeiro, Brasil


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [expert] New (server) install of LM 7.2

2000-11-22 Thread Andy Judge

Is this a new install or are you trying to upgrade a new install?  My
install went off without a hitch with Apache, MySQL, and PHP.  It should be
all there and working when you install.  You are trying to setup Nuke right?
Should work no probs on the development install.  I believe the packages you
need are mm, apache and apache-common and php in that order.  Then add MySQL
and mods.

Andy
- Original Message -
From: "Tim Litwiller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 8:37 AM
Subject: [expert] New (server) install of LM 7.2


> Apache works but PHP doesn't I just get the source.  I checked to
> make sure that PHP was installed rpm -q php shows php 4.0.3***  I
> checked the http.conf file and there is nothing there about php
> except the default that is commented out.
>
> what would be best, uninstall php and reinstall and hope it
> installes correctly this time, of find a non-mandrake
> apache-php-mysql setup and put this on,   I have already spent
> more time trying to get mandrake to work than I spent updating
> apache and adding mysql and php to a redhat machine.
>
>
>
>
>






> Keep in touch with http://mandrakeforum.com:
> Subscribe the "[EMAIL PROTECTED]" mailing list.
>



Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



[expert] New (server) install of LM 7.2

2000-11-21 Thread Tim Litwiller

Apache works but PHP doesn't I just get the source.  I checked to
make sure that PHP was installed rpm -q php shows php 4.0.3***  I
checked the http.conf file and there is nothing there about php
except the default that is commented out.

what would be best, uninstall php and reinstall and hope it
installes correctly this time, of find a non-mandrake
apache-php-mysql setup and put this on,   I have already spent
more time trying to get mandrake to work than I spent updating
apache and adding mysql and php to a redhat machine.






Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] New Server

2000-07-04 Thread Ron Johnson, Jr.

Daniel Woods wrote:
> 
> > The only things I'm not sure of is the Dlink DE-538TX 10/100 PCI
> > ethernet card ...
> 
> I have this and the DFE-530TX+ and both work well.  Linux
> sees this as a 'rt18139' driver.
> 
> Thanks... Dan.

Note that it's an "ell" not a "one": rtl8139, not rt18139 driver.
   ^^

Ron
-- 
+--+
| Ron Johnson, Jr.Home: [EMAIL PROTECTED]   |
| Jefferson, LA  USA  WWW : [EMAIL PROTECTED] |
|  |
| Most overused words: feel, cool/kewl, fun, myBlah.com|
| Most underused word: think   |
+--+




Re: [expert] New Server

2000-07-03 Thread Daniel Woods



> The only things I'm not sure of is the Dlink DE-538TX 10/100 PCI
> ethernet card ...

I have this and the DFE-530TX+ and both work well.  Linux
sees this as a 'rt18139' driver.

Thanks... Dan.




[expert] New Server

2000-07-02 Thread Vincent Danen

Hi there, I'm looking to purchase a new server tomorrow to replace my
existing server and this is what I'm looking at for specs.  Could
someone give me any comments as to whether or not I will run into any
problems?  Thanks.

VIEWSONIC E771 17" 0.27 COLOR MONITOR
DIMMS 168PIN 256MB SDRAM (133HZ) PC 133 (16 CHIPS)
ATI XPERT 2000 AGP W/32MB (OEM)
DLINK DE-538TX 10/100 PCI ETHERNET CARD
MAXTOR 30GB IDE HARD DRIVE 9MS ATA 66 7200RPM W/2MB CACHE
MAXTOR 30GB IDE HARD DRIVE 9MS ATA 66 7200RPM W/2MB CACHE
CD ROM - PANASONIC IDE 32X DRIVE ONLY
FUJITSU 8725 104 WIN 95 PS/2 ENHANCED KEYBOARD (if M/B supports)
ACER ATX HX08 FULL SIZE TOWER CASE 250W PS
AMD ATHLON K7 (SLOT A) CPU CHIPS (RETAIL BOX) **WITH HEAT SINK & FAN**
AMD ATHLON K7-750 MHZ CPU SLOT A
ASUS K7M ATX (SLOT A) AMD-751 AGPset (ULTRA DMA 66) W/O AUDIO
DLINK DSS-8 DESKTOP 8-PORT 10/100MPS SWITCH 
APC BACK-UPS PRO 350 BP350UC

I will be moving some stuff from the existing server (an Adaptec 1540
SCSI card, external ZIP 100 SCSI, and internal SCSI Seagate 10GB/20GB
tape drive), and have a floppy drive kicking around to stick in it. 
I'm building it from scratch (just getting the pieces), and I'm
pretty sure all of this will work good.  Initially I'll be putting
Mandrake 7.0 on it with an upgrade to 7.1 in the next 6 months (once
I've played with it enough to ensure my server doesn't get chewed).

The only things I'm not sure of is the Dlink DE-538TX 10/100 PCI
ethernet card (oh, and the ATI XPERT 2000 card is being swapped for a
ATI Rage Pro Turbo 2x video card, I just want the 32MB card to throw
in my Windows98 "Nintendo").  Everything else will work good, I
think, but I'd like some suggestions.  Oh yeah, they also have a sale
on now for a Epox EP-7KA ATX M/B with a Athlon K7-650 CPU for about
$150 less than the ASUS M/B and Athlon K7-750 CPU.  I've never heard
of Epox before... does anyone know if it's any good?  

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
Freezer Burn BBS:  telnet://bbs.freezer-burn.org . ICQ: 54924721
Webmaster for the Linux Portal Site Freezer Burn:  http://www.freezer-burn.org

Current Linux uptime: 7 days 6 hrs and 19 mins.