FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-29-2010, 04:14 PM
Tanstaafl
 
Default postfixadmin vacation user uid/home in /etc/passwd

Greetings,

I'm updating an old system I inherited that has postfixadmin 2.1
installed, and I have a question about the vacation user entry in
/etc/passwd...

Can I just change it directly (by editing the file with a text editor)
without worrying about anything breaking?

Currently it is:

vacation:x:1003:65501::/home/vacation:/bin/bash

and I want to change it to be the same as the INSTALL.TXT recommends:

vacation:x:65501:65501::0:0:Virtual Vacation:/nonexistent:/sbin/nologin

So, can I just edit the file and be done with it?

Also, out of curiosity - can /etc/passwd file contain comments?

Thanks...
 
Old 12-29-2010, 07:50 PM
kashani
 
Default postfixadmin vacation user uid/home in /etc/passwd

On 12/29/2010 9:14 AM, Tanstaafl wrote:

Greetings,

I'm updating an old system I inherited that has postfixadmin 2.1
installed, and I have a question about the vacation user entry in
/etc/passwd...

Can I just change it directly (by editing the file with a text editor)
without worrying about anything breaking?

Currently it is:

vacation:x:1003:65501::/home/vacation:/bin/bash

and I want to change it to be the same as the INSTALL.TXT recommends:

vacation:x:65501:65501::0:0:Virtual Vacation:/nonexistent:/sbin/nologin

So, can I just edit the file and be done with it?

Also, out of curiosity - can /etc/passwd file contain comments?

Thanks...



To your original question, if it works I not would touch it. You may
want to look in /home/vacation for .forward or other files that might be
helping the vacation functions work if you do decide to change
/etc/passwd. IIRC and it's been years vacation was a bit flakey under
2.1 and it required a fair amount of undocumented tweaking to work
correctly though it did get better in late 2.1.x.
I would consider a plan to upgrade to 2.3.2, but it would be far
simpler to build a new system and switch over to it than upgrade in
place. And safer.


kashani
 
Old 12-29-2010, 08:36 PM
Tanstaafl
 
Default postfixadmin vacation user uid/home in /etc/passwd

On 2010-12-29 3:50 PM, kashani wrote:
> On 12/29/2010 9:14 AM, Tanstaafl wrote:
>> I'm updating an old system I inherited that has postfixadmin 2.1
>> installed, and I have a question about the vacation user entry in
>> /etc/passwd...

<snip>

> I would consider a plan to upgrade to 2.3.2,

I guess I could have been clearer - I said I was updating the system,
and updating pfadmin to 2.3.2 is what I'm doing now... and I want to
configure everything *correctly*. Right now, vacation has a shell, and
it shouldn't - I just want to know if simply editing /etc/passwd is the
correct way to fix it...

> but it would be far simpler to build a new system and switch over to
> it than upgrade in place. And safer.

I already have the new pfadmin up and running, and I'll be switching
over this weekend...

Any idea about my other question:

>> Also, out of curiosity - can /etc/passwd file contain comments?

Thanks...
 
Old 12-29-2010, 10:59 PM
kashani
 
Default postfixadmin vacation user uid/home in /etc/passwd

On 12/29/2010 1:36 PM, Tanstaafl wrote:

On 2010-12-29 3:50 PM, kashani wrote:

On 12/29/2010 9:14 AM, Tanstaafl wrote:

I'm updating an old system I inherited that has postfixadmin 2.1
installed, and I have a question about the vacation user entry in
/etc/passwd...


<snip>


I would consider a plan to upgrade to 2.3.2,


I guess I could have been clearer - I said I was updating the system,
and updating pfadmin to 2.3.2 is what I'm doing now... and I want to
configure everything *correctly*. Right now, vacation has a shell, and
it shouldn't - I just want to know if simply editing /etc/passwd is the
correct way to fix it...


but it would be far simpler to build a new system and switch over to
it than upgrade in place. And safer.


I already have the new pfadmin up and running, and I'll be switching
over this weekend...

Any idea about my other question:


Also, out of curiosity - can /etc/passwd file contain comments?


Thanks...



Sure you can edit it directly though you'll break anyone currently using
vacation as soon as you do. Make sure you fix /etc/shadow and /etc/group
too. Or use usermod which would be the proper way to make the change.


/etc/passwd shouldn't have stand alone comments which might cause weird
problems with pwconv, grpconv, etc. Use the comment field of the user.


kashani
 
Old 12-30-2010, 08:33 AM
Daniel Troeder
 
Default postfixadmin vacation user uid/home in /etc/passwd

On 12/30/2010 12:59 AM, kashani wrote:
> On 12/29/2010 1:36 PM, Tanstaafl wrote:
>> On 2010-12-29 3:50 PM, kashani wrote:
>>> On 12/29/2010 9:14 AM, Tanstaafl wrote:
>>>> I'm updating an old system I inherited that has postfixadmin 2.1
>>>> installed, and I have a question about the vacation user entry in
>>>> /etc/passwd...
>>
>> <snip>
>>
>>> I would consider a plan to upgrade to 2.3.2,
>>
>> I guess I could have been clearer - I said I was updating the system,
>> and updating pfadmin to 2.3.2 is what I'm doing now... and I want to
>> configure everything *correctly*. Right now, vacation has a shell, and
>> it shouldn't - I just want to know if simply editing /etc/passwd is the
>> correct way to fix it...
>>
>>> but it would be far simpler to build a new system and switch over to
>>> it than upgrade in place. And safer.
>>
>> I already have the new pfadmin up and running, and I'll be switching
>> over this weekend...
>>
>> Any idea about my other question:
>>
>>>> Also, out of curiosity - can /etc/passwd file contain comments?
>>
>> Thanks...
>>
>
> Sure you can edit it directly though you'll break anyone currently using
> vacation as soon as you do. Make sure you fix /etc/shadow and /etc/group
> too. Or use usermod which would be the proper way to make the change.
>
> /etc/passwd shouldn't have stand alone comments which might cause weird
> problems with pwconv, grpconv, etc. Use the comment field of the user.
>
> kashani
>
See "$ man -S5 passwd" for the format of /etc/passwd. Or in short:

Each line of the file describes a single user, and has the following format:
accountassword:UID:GID:GECOS:directory:shell

So there is no comment allowed. But you can place this stuff in GECOS if
you like and need it. Will be visible to users though.

About editing /etc/passwd directly: don't! It can mess up your system,
so that noone can login anymore. The recomended way is "$ usermod", the
"direct" way is "$ vipw". It is a wrapper around "vi" that does simple
sytax checks, so you don't break things. I use it if I have to edit
/etc/passwd. There is also "vigr" "$ vipw -s" and "$vigr -s" lets you
edit the shadow files.

Bye,
Daniel


--
PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get
# gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887
 

Thread Tools




All times are GMT. The time now is 07:09 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org