Hi all, I notice that if I ad users by hand with useradd/userdel in SUSE 9.1, home directories are not created. Any idea how to set the default for home directories to be made with useradd (as in useradd -m name) and deleted with userdel (as in userdel -r name)? I looked at /etc/default/useradd and found: HOME=/home /usr/sbin/useradd.local talks about adding home, but it (and the manpage) doesn't say how. Any ideas? Thanks -- Kind regards Hans du Plooy Newington Consulting Services hansdp at newingtoncs dot co dot za
On Fri, 2004-08-27 at 10:24, Hans du Plooy wrote:
Hi all,
I notice that if I ad users by hand with useradd/userdel in SUSE 9.1, home directories are not created. Any idea how to set the default for home directories to be made with useradd (as in useradd -m name) and deleted with userdel (as in userdel -r name)?
I looked at /etc/default/useradd and found: HOME=/home
/usr/sbin/useradd.local talks about adding home, but it (and the manpage) doesn't say how.
Any ideas?
Thanks -- Kind regards Hans du Plooy Newington Consulting Services hansdp at newingtoncs dot co dot za
From the man page for useradd...
-m, --create-home Create home directory for new user account.
From the man page for userdel...
-r, --remove-home Remove the whole home directory and the mail spool of the specified account. Files located in other directories will have to be searched for and deleted manually. Perhaps further reading of the man pages are in order. -- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998 (5.2) * PLEASE only reply to the list *
Hans wrote regarding '[SLE] useradd/del defaults' on Fri, Aug 27 at 09:22:
Hi all,
I notice that if I ad users by hand with useradd/userdel in SUSE 9.1, home directories are not created. Any idea how to set the default for home directories to be made with useradd (as in useradd -m name) and deleted with userdel (as in userdel -r name)?
I looked at /etc/default/useradd and found: HOME=/home
/usr/sbin/useradd.local talks about adding home, but it (and the manpage) doesn't say how.
Any ideas?
If you're running bash, you can alias a command to itself. For example, I like for ls to print color output all the time, even though my terminal string is incorrect as far as it knows. So, for logins on this terminal, I do alias ls='ls --color' Sure, it'd be more logical to create a config file, but this is easy (and it breaks scripts that parse ls, which is good because those scripts are dumb). In your case, you'd put in your .profile/.bashrc alias useradd='useradd -m' alias userdel='userdel -r' Our favorite bash is smart in that it avoids recursive alias problems. If you're on a particularly old system or running a different shell that's stupid, that may not be such a good idea - but it works on modern stuff. --Danny
Hello All, After testing it appears that Channel Bonding in SuSE 9.0 is not reliable. The NIC team appears to load normally but does not consistently fail over when a cable is disconnected. More specifically, the team fails over without a hitch but whichever slave interface was added to the team last will not function normally, and the team won't function until the first NIC is reconnected AND the second NIC disconnected (forcing the team to pick the first NIC back up). This was confirmed by reversing the order of the bonded slave interfaces attached in the "ifenslave" command: changing the command from 'ifenslave bond0 eth0 eth1' to ifenslave bond0 eth1 eth0' made the problem reverse itself. It appears that the default compile of ifenslave included with SuSE 9.0 ignores the instructions in /usr/src/linux-2.4.21-226/Documentation/networking/bonding.txt and compiles using the header file if_bonding.h found in /usr/include/linux instead of the proper one in the kernel source directory /usr/src/linux/include. Recompiling and replacing the executable makes it work. A running ping session stutters briefly when the active NIC is disconnected, but only a few packets are dropped (about 1 ping out of 50). After about 30 seconds, the connection pings reliably (I have let it run for as many as 1000 pings without dropping any packets). The good news is that the proper version of ifenslave now supports mode 6 (adaptive load balancing), providing both fault-tolerance and aggregated throughput. I have attached a mini-howto. I encourage you all to test and experiment with this, Randy Rue Randall Rue System Administrator, Postmaster IT, Server Operations Fred Hutchinson Cancer Research Center Seattle, WA USA *NETWORK INTERFACE TEAMING USING KERNEL-BASED CHANNEL BONDING IN SuSE 9.0* * * *Version 2.0 **August 27, 2004*** 1. Use yast to configure both Ethernet interfaces as DHCP clients. 2. Recompile the executable /sbin/ifenslave (SuSE’s default compile of this command uses the wrong header files, and will appear to load normally, but does not function properly): /a. //Find the file ‘ifenslave.c” using ‘locate ifenslave.c” and cd to its directory./ /b. //gcc -Wall -Wstrict-prototypes -O -I/usr/src/linux/include ifenslave.c -o ifenslave/ /c. //mv /sbin/ifenslave /sbin/ifenslave.orig/ /d. //mv ifenslave /sbin/ifenslave/ 3. Add the following two lines to /etc/modules.conf.local: /alias bond0 bonding/ /options bonding miimon=100 mode=6/ / / 4. Edit /etc/sysconfig/network/ifcfg-ethX for each of the interfaces eth0 and eth1 (or whatever physical interfaces are to be bonded): 1. Retain the “/Unique=’xxxyyyzzz’/” defined by yast 2. Otherwise modify the files as shown: /DEVICE='ethX'/ /USERCTL='no'/ /ONBOOT='yes'/ /STARTMODE='onboot'/ /MASTER='bond0'/ /SLAVE='yes'/ /BOOTPROTO='none'/ /UNIQUE=’xxxyyyzzz’/ / / 5. Create a file /etc/sysconfig/network/ifcfg-bond0 with the same permissions as the other ifcfg-xxx files: /DEVICE='bond0'/ /IPADDR='www.xxx.yyy.zzz'/ /NETMASK='255.255.25y.0'/ /NETWORK='www.xxx.yyy.0'/ /BROADCAST='www.xxx.yyy.255'/ /STARTMODE='onboot'/ /BOOTPROTO='static'/ /USERCTL='no'/ /BONDING_MASTER='yes'/ /BONDING_SLAVE0='eth0'/ /BONDING_SLAVE1='eth1'/ / / 6. Edit /etc/init.d/network: to the end of the “start” case statement (approximately line 200), add the following two lines as shown. *Before:* / esac/ / rc_reset/ / done/ / [ ! -z "$WAIT_FOR_INTERFACES" ] && sleep $WAIT_FOR_INTERFACES/ *After:* / esac/ / rc_reset/ / done/ */ ## Added to start NIC bonding when starting network ##/* */ /sbin/ifenslave bond0 eth0 eth1/* / [ ! -z "$WAIT_FOR_INTERFACES" ] && sleep $WAIT_FOR_INTERFACES/ 7. Restart the network interfaces ( “rcnetwork restart”) and test for proper configuration using ping, ifconfig and “cat /proc/net/bond0/info” 8. Reboot the machine and test again for proper configuration. 9. Start a ping (i.e. /ping yahoo.com/) and test that the process recovers and continues when either interface is disconnected.
On Friday 27 Aug 2004 19:40, Randy Rue wrote:
Hello All,
After testing it appears that Channel Bonding in SuSE 9.0 is not reliable. The NIC team appears to load normally but does not consistently fail over when a cable is disconnected. More specifically, the team fails over without a hitch but whichever slave interface was added to the team last will not function normally, and the team won't function until the first NIC is reconnected AND the second NIC disconnected (forcing the team to pick the first NIC back up). This was confirmed by reversing the order of the bonded slave interfaces attached in the "ifenslave" command: changing the command from 'ifenslave bond0 eth0 eth1' to ifenslave bond0 eth1 eth0' made the problem reverse itself.
It appears that the default compile of ifenslave included with SuSE 9.0 ignores the instructions in /usr/src/linux-2.4.21-226/Documentation/networking/bonding.txt and compiles using the header file if_bonding.h found in /usr/include/linux instead of the proper one in the kernel source directory /usr/src/linux/include. Recompiling and replacing the executable makes it work. A running ping session stutters briefly when the active NIC is disconnected, but only a few packets are dropped (about 1 ping out of 50). After about 30 seconds, the connection pings reliably (I have let it run for as many as 1000 pings without dropping any packets).
The good news is that the proper version of ifenslave now supports mode 6 (adaptive load balancing), providing both fault-tolerance and aggregated throughput.
I have attached a mini-howto.
I encourage you all to test and experiment with this,
Randy Rue
Randall Rue System Administrator, Postmaster IT, Server Operations Fred Hutchinson Cancer Research Center Seattle, WA USA
*NETWORK INTERFACE TEAMING USING KERNEL-BASED CHANNEL BONDING IN SuSE 9.0*
* *
*Version 2.0 **August 27, 2004***
1. Use yast to configure both Ethernet interfaces as DHCP clients.
2. Recompile the executable /sbin/ifenslave (SuSE’s default compile of this command uses the wrong header files, and will appear to load normally, but does not function properly):
/a. //Find the file ‘ifenslave.c” using ‘locate ifenslave.c” and cd to its directory./
/b. //gcc -Wall -Wstrict-prototypes -O -I/usr/src/linux/include ifenslave.c -o ifenslave/
/c. //mv /sbin/ifenslave /sbin/ifenslave.orig/
/d. //mv ifenslave /sbin/ifenslave/
3. Add the following two lines to /etc/modules.conf.local:
/alias bond0 bonding/
/options bonding miimon=100 mode=6/
/ /
4. Edit /etc/sysconfig/network/ifcfg-ethX for each of the interfaces eth0 and eth1 (or whatever physical interfaces are to be bonded): 1. Retain the “/Unique=’xxxyyyzzz’/” defined by yast 2. Otherwise modify the files as shown:
/DEVICE='ethX'/
/USERCTL='no'/
/ONBOOT='yes'/
/STARTMODE='onboot'/
/MASTER='bond0'/
/SLAVE='yes'/
/BOOTPROTO='none'/
/UNIQUE=’xxxyyyzzz’/
/ /
5. Create a file /etc/sysconfig/network/ifcfg-bond0 with the same permissions as the other ifcfg-xxx files:
/DEVICE='bond0'/
/IPADDR='www.xxx.yyy.zzz'/
/NETMASK='255.255.25y.0'/
/NETWORK='www.xxx.yyy.0'/
/BROADCAST='www.xxx.yyy.255'/
/STARTMODE='onboot'/
/BOOTPROTO='static'/
/USERCTL='no'/
/BONDING_MASTER='yes'/
/BONDING_SLAVE0='eth0'/
/BONDING_SLAVE1='eth1'/
/ /
6. Edit /etc/init.d/network: to the end of the “start” case statement (approximately line 200), add the following two lines as shown.
*Before:*
/ esac/
/ rc_reset/
/ done/
/ [ ! -z "$WAIT_FOR_INTERFACES" ] && sleep $WAIT_FOR_INTERFACES/
*After:*
/ esac/
/ rc_reset/
/ done/
*/ ## Added to start NIC bonding when starting network ##/*
*/ /sbin/ifenslave bond0 eth0 eth1/*
/ [ ! -z "$WAIT_FOR_INTERFACES" ] && sleep $WAIT_FOR_INTERFACES/
7. Restart the network interfaces ( “rcnetwork restart”) and test for proper configuration using ping, ifconfig and “cat /proc/net/bond0/info”
8. Reboot the machine and test again for proper configuration.
9. Start a ping (i.e. /ping yahoo.com/) and test that the process recovers and continues when either interface is disconnected.
Hummmm strange i could have sworn that this thread was about useradd/del not eth bonding . -- Linux user No: 256242 Machine No: 139931 G6NJR Pete also MSA registered "Quinton 11" A Linux Only area Happy bug hunting M$ clan PGN
* peter Nikolic
On Friday 27 Aug 2004 19:40, Randy Rue wrote:
Hello All,
After testing it appears that Channel Bonding in SuSE 9.0 is not ... Hummmm strange i could have sworn that this thread was about useradd/del not eth bonding .
But, it was *really* necessary to quote all 158 lines of the hi-jacked thread to make a point??? thanks -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos
Did I mispost this? It was intended as a new thread... Randy Rue Patrick Shanahan wrote:
* peter Nikolic
[08-27-04 17:06]: On Friday 27 Aug 2004 19:40, Randy Rue wrote:
Hello All,
After testing it appears that Channel Bonding in SuSE 9.0 is not
...
Hummmm strange i could have sworn that this thread was about useradd/del not eth bonding .
But, it was *really* necessary to quote all 158 lines of the hi-jacked thread to make a point???
thanks
The Friday 2004-08-27 at 16:42 -0700, Randy Rue wrote:
Did I mispost this? It was intended as a new thread...
1: Yes. 2: No. What you did was hijack an existing thread. Instead of creating a new thread, you created an answer to a previous message, erased the contents, and replaced the subject. Aparently, it is a new thread to you, but it is not. There are "hidden" headers (*) that show that it is in fact a reply to another mail, and break threading, as shown here: 6307 Aug 27 Hans du Plooy (3274) [SLE] useradd/del defaults 6308 Aug 27 Ken Schneider (4337) |-> 6309 Aug 27 Danny Sauer (4296) |-> 6310 Aug 27 Randy Rue (7490) |-[SLE] SuSE 9.0 Channel Bonding Quirk, ifen 6311 Aug 27 peter Nikolic (7892) |-> 6312 Aug 27 Patrick Shanahan (3736) |-[SLE] useradd/del, was ??: Re: [SLE] S 6313 Aug 27 Randy Rue (3758) |-> (*) References: <200408271624.52034.hansdp@newingtoncs.co.za> <20040827110408.P18863@newwww.internal.teleologic.net> In-Reply-To: <20040827110408.P18863@newwww.internal.teleologic.net> -- Cheers, Carlos Robinson
On Friday 27 August 2004 18:04, Danny Sauer wrote:
If you're running bash, you can alias a command to itself. For example, I like for ls to print color output all the time, even though my terminal string is incorrect as far as it knows. So, for logins on this terminal, I do alias ls='ls --color'
Thanks Danny, I made a /etc/bash.bashrc.local as described at the end of bash.bashrc and put a alias for each in there. Works like a charm! Every day I learn something new... -- Kind regards Hans du Plooy Newington Consulting Services hansdp at newingtoncs dot co dot za
participants (7)
-
Carlos E. R.
-
Danny Sauer
-
Hans du Plooy
-
Ken Schneider
-
Patrick Shanahan
-
peter Nikolic
-
Randy Rue