public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] postfixadmin vacation user uid/home in /etc/passwd
@ 2010-12-29 17:14 Tanstaafl
  2010-12-29 20:50 ` kashani
  0 siblings, 1 reply; 5+ messages in thread
From: Tanstaafl @ 2010-12-29 17:14 UTC (permalink / raw
  To: gentoo-user

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...



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] postfixadmin vacation user uid/home in /etc/passwd
  2010-12-29 17:14 [gentoo-user] postfixadmin vacation user uid/home in /etc/passwd Tanstaafl
@ 2010-12-29 20:50 ` kashani
  2010-12-29 21:36   ` Tanstaafl
  0 siblings, 1 reply; 5+ messages in thread
From: kashani @ 2010-12-29 20:50 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] postfixadmin vacation user uid/home in /etc/passwd
  2010-12-29 20:50 ` kashani
@ 2010-12-29 21:36   ` Tanstaafl
  2010-12-29 23:59     ` kashani
  0 siblings, 1 reply; 5+ messages in thread
From: Tanstaafl @ 2010-12-29 21:36 UTC (permalink / raw
  To: gentoo-user

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...



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] postfixadmin vacation user uid/home in /etc/passwd
  2010-12-29 21:36   ` Tanstaafl
@ 2010-12-29 23:59     ` kashani
  2010-12-30  9:33       ` Daniel Troeder
  0 siblings, 1 reply; 5+ messages in thread
From: kashani @ 2010-12-29 23:59 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] postfixadmin vacation user uid/home in /etc/passwd
  2010-12-29 23:59     ` kashani
@ 2010-12-30  9:33       ` Daniel Troeder
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Troeder @ 2010-12-30  9:33 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2383 bytes --]

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:
          account:password: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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-30  8:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-29 17:14 [gentoo-user] postfixadmin vacation user uid/home in /etc/passwd Tanstaafl
2010-12-29 20:50 ` kashani
2010-12-29 21:36   ` Tanstaafl
2010-12-29 23:59     ` kashani
2010-12-30  9:33       ` Daniel Troeder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox