List Info

Thread: How to create username with "."




How to create username with "."
user name
2006-09-21 11:44:49



>Marq wrote:
>> Hi
>> 
>> When i create username like this
>> "useradd user.name"
>> It shows the error message saying that the name
contains invalid characters
>
>It is bad idea to create such users.  For example, chown
command accepts 
>argument of type "user.group".  You should
stick with letters and numbers.
>

The chown(1) man page says that a colon ":" is
the delimiting character:

NAME
       chown - change file owner and group

SYNOPSIS
       chown [OPTION]... [OWNER][:[GROUP]] FILE...


My advice to Marq would be to use a dummy username, and then
manually edit the passwd and shadow files.  We've been
using usernames like first.m.last for several years to
maintain compatibility with another operating system; the
users don't like having to use the long usernames but it
works.
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-requestredhat.com?subject=unsubscribe
h
ttps://www.redhat.com/mailman/listinfo/redhat-list
How to create username with "."
user name
2006-09-21 11:53:45
Hi Marq
I am using RHEL v4 and works fine, I can add users with a
".", it happened to 
me with RHEL v3 and solved the problem with updating some
package 
shadow-utils.

Thanks

 --Adel

On Thursday 21 September 2006 15:44, Miner, Jonathan W (CSC)
(US SSA) wrote:
> >Marq wrote:
> >> Hi
> >>
> >> When i create username like this
> >> "useradd user.name"
> >> It shows the error message saying that the
name contains invalid
> >> characters
> >
> >It is bad idea to create such users.  For example,
chown command accepts
> >argument of type "user.group".  You
should stick with letters and numbers.
>
> The chown(1) man page says that a colon ":"
is the delimiting character:
>
> NAME
>        chown - change file owner and group
>
> SYNOPSIS
>        chown [OPTION]... [OWNER][:[GROUP]] FILE...
>
>
> My advice to Marq would be to use a dummy username, and
then manually edit
> the passwd and shadow files.  We've been using
usernames like first.m.last
> for several years to maintain compatibility with
another operating system;
> the users don't like having to use the long usernames
but it works.

-- 
Adel Ben Zarrouk
Senior Project Manager
Opennet MEA FZ LLC
Tel: +971 4 390 1943
Fax: +971 4 390 4360
Cell:+971 50 458 2797
http://www.opennet.ae/

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-requestredhat.com?subject=unsubscribe
h
ttps://www.redhat.com/mailman/listinfo/redhat-list
How to create username with "."
user name
2006-09-21 12:18:42
Hello! Have you ever heard about mail aliases?  I think it
is for this.
You can have elegant, long personal names, and short ones
for login!  

Good luck,
 Balázs
 --
>>> When i create username like this
>>> "useradd user.name"
>>> It shows the error message saying that the name
contains invalid
>>> characters

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-requestredhat.com?subject=unsubscribe
h
ttps://www.redhat.com/mailman/listinfo/redhat-list
How to create username with "."
user name
2006-09-21 15:47:31
Quoting "Miner, Jonathan W (CSC) (US SSA)"
<jonathan.w.minerbaesystems.com>:

> The chown(1) man page says that a colon ":"
is the delimiting character:
>
> NAME
>        chown - change file owner and group
>
> SYNOPSIS
>        chown [OPTION]... [OWNER][:[GROUP]] FILE...

Couple of lines down in the same man page is the following
sentence:

"If the user name is followed by a colon or dot and a
group name (or  
numeric group ID), with no spaces between them, the group
ownership of  
the files is changed as well."

Chown in Linux uses dot as alternative separator between
user name and  
group name for compatibility with some Unix systems that use
dot  
separator.  Dot was choosen as separator since it is not
allowed in  
user names.  On Unix systems, it is advisable to limit
yourself to  
8-chars usernames (most utilities will work fine with longer
 
usernames, but not all of them).  And also to limit yourself
what  
characters you are using.

Without looking in the manual page or trying it out on
command line,  
could you answer these questions.

1. If you have users foo and foo.bar, and group bar, what
will be  
result of "chown foo.bar filename"?

  A. chown will exit with error
  B. chown will change file owner to foo.bar, and leave the
group unchanged
  C. chown will change file owner to foo and group to bar
  D. chown will change file owner to foo.bar and group to
bar

2. If you have users foo and foo.bar, but there is no group
bar, what  
will be the result of "chown foo.bar filename":

  A. chown will complain group bar does not exist
  B. chown will change file owner to foo.bar
  C. chown will change file owner to foo

3. Same as above, but you have only user foo.bar.

Any program that validates user supplied data could (and
should)  
reject usernames with dots if supplied in argument list
(just like  
useradd does).  This should especially be the case for Web  
applications (CGI scripts, PHP, ...).

-- 
NOTICE: If you are not intended recipient, you are hereby
notified
that by reading this message you agreed not to disturb frogs
during
mating season.  For more info, visit http://www.8-P.ca/


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-requestredhat.com?subject=unsubscribe
h
ttps://www.redhat.com/mailman/listinfo/redhat-list
How to create username with "."
user name
2006-09-22 01:59:46
On Thu, 2006-09-21 at 10:47 -0500, Aleksandar Milivojevic
wrote:
> Quoting "Miner, Jonathan W (CSC) (US SSA)"
<jonathan.w.minerbaesystems.com>:
> 
> > The chown(1) man page says that a colon
":" is the delimiting character:
> >
> > NAME
> >        chown - change file owner and group
> >
> > SYNOPSIS
> >        chown [OPTION]... [OWNER][:[GROUP]] FILE...
> 
> Couple of lines down in the same man page is the
following sentence:
> 
> "If the user name is followed by a colon or dot
and a group name (or  
> numeric group ID), with no spaces between them, the
group ownership of  
> the files is changed as well."
> 
> Chown in Linux uses dot as alternative separator
between user name and  
> group name for compatibility with some Unix systems
that use dot  
> separator.  Dot was choosen as separator since it is
not allowed in  
> user names.  On Unix systems, it is advisable to limit
yourself to  
> 8-chars usernames (most utilities will work fine with
longer  
> usernames, but not all of them).  And also to limit
yourself what  
> characters you are using.
> 
I can't find any documentation that states the dot
character is not
allowed in user names.

In fact I have user names with dots, underscores and  symbols
in them
all of which work as expected.

I was also under the impression that the dot separator in
chown was
deprecated in favour of the colon, but the man page
certainly doesn't
reflect that.

-- 
Karl Latiss <karl.latissatvert.com.au>
Atvert Systems

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-requestredhat.com?subject=unsubscribe
h
ttps://www.redhat.com/mailman/listinfo/redhat-list
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )