[EMAIL PROTECTED] wrote:
I would not recommend using vipw [...] to change your users' shells.
Why not?
--Alex
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any
+++ Alex Zbyslaw [freebsd] [10-10-06 11:57 +0100]:
| [EMAIL PROTECTED] wrote:
|
| I would not recommend using vipw [...] to change your users' shells.
|
| Why not?
|
| --Alex
man pw
and look for '-s' option
Though it many need little bit of scripting. This may be useful to
automate the
Because that's what pw is for...you don't need to worry about accidentally
deleting a colon, for example. A script using pw would also be a huge
timesaver over manually editing hundreds of entries, I'd think as well.
Of course, sed can do it even quicker, but with the same risks.
On Tue, 10 Oct
Dear guru's:
How to change all word lines of /bin/bash at /etc/passwd file to
/sbin/nologin in just a single line command?
I am looking forward for your great responses.
Thank you.
Regards,
--
James G. Corteciano
FreeBSD User
___
Hi James,
On Monday 09 October 2006 09:24, James Corteciano wrote:
How to change all word lines of /bin/bash at /etc/passwd file to
/sbin/nologin in just a single line command?
I think you can do this with:
sed 's!/bin/bash$!/sbin/nologin!' /etc/passwd /etc/passwd
Best regards,
Lothar
sed -i .backup s,:/bin/bash$,:/sbin/nologin, /etc/passwd
But at least on my FBSD systems bash is in /usr/local/bin/bash, not
/bin/bash! And what would you need this for?
Cheers,
Kurt
On Mon, Oct 09, 2006 at 03:24:30PM +0800, James Corteciano wrote:
Dear guru's:
How to change all word
On 10/9/06, James Corteciano [EMAIL PROTECTED] wrote:
Dear guru's:
How to change all word lines of /bin/bash at /etc/passwd file to
/sbin/nologin in just a single line command?
I am looking forward for your great responses.
Thank you.
Regards,
--
James G. Corteciano
FreeBSD User
El día Monday, October 09, 2006 a las 09:41:38AM +0200, Lothar Braun escribió:
Hi James,
On Monday 09 October 2006 09:24, James Corteciano wrote:
How to change all word lines of /bin/bash at /etc/passwd file to
/sbin/nologin in just a single line command?
I think you can do this with:
Hi Lothar,
Thanks for your response. How about if all uid's that =500 at passwd file
must change from /bin/bash to /sbin/nologin?
Thank you.
Best regards,
James C.
FreeBSD User
On 10/9/06, Lothar Braun [EMAIL PROTECTED] wrote:
Hi James,
On Monday 09 October 2006 09:24, James Corteciano
On Monday 09 October 2006 10:03, Matthias Apitz wrote:
sed 's!/bin/bash$!/sbin/nologin!' /etc/passwd /etc/passwd
DONT DO THAT this way. The result would be that your actual
shell truncates the file '/etc/passwd' to zero length and
then launches the 'sed'.
Damn. I just built the regexp but
Dear guru's,
Thanks all you guys for the great response. Now, I've done it using
text-editor of NANO and there is Find, and To Replace section which makes
big help to replacing the whole word.
Best regards,
James Corteciano
FreeBSD User
On 10/9/06, Lothar Braun [EMAIL PROTECTED] wrote:
On
I would not recommend using vipw or sed to change your users' shells.
I'd just create a file of users:
cat /etc/passwd | cut -f1 -d: userlist
(Edit out any users you don't want to include):
then a scipt using pw to change their shells
#!/bin/sh
user=`awk '{print $1}' ./userlist`
for user
12 matches
Mail list logo