# Problems whit superuseradd..!

## kkj

Hi all

I have Useradd problems....I think  :Smile: 

I first did....Its wrong I now know   :Smile: 

#useradd name

#passwd name

I now use the superuseradd script, but it didnt help

#superuseradd

.....

Here is a list of some of my problems, i think that they r all related to user add problems..

user test has userid 1009 and is added whit the superuseradd script.

1

when test logs in to the system...

#login: test

#passwd qqqq

/usr/bin/whoami cannot find username for UID 1009

[: =: unary operator expected

I have no name!@mymashine test$

2

If i do

#ls -l

drwx------    3 1009     100          4096 Jul 17 14:07 Desktop

drwx------    7 1009     100          4096 Jul 17 14:07 Mail

-rw-r--r--    1 1009     100             0 Jul 17 14:25 test.txt

shouldnt it be the users name in the list ?

my passwd file..!

test:x:1009:100:Karsten Kjær Jensen,204,,22339600:/home/test:/bin/bash

Hope someone can point me in the right direction PLEASE  :Smile: 

btw. I have read almost all posting in here and elsewhere...

----------

## nsadhal

i really have no idea, but is the user a member of any group by default?

see what happens if you add the user to a group... say users....

```
usermod -g users test
```

if you want the user to be able to su, then add the flag -G wheel

of course, i'm a n00b too, so i could be completely wrong.

----------

## rac

Are you using NIS?

----------

## kkj

 *rac wrote:*   

> Are you using NIS?

 

I dont use NIS, should I be using it ?

The user is a member off Group users,wheel,audio,test

as u can see

~

[I have no name!@mymashine pts/2] groups

100 10 18 408

--

strip from /etc/group file 

...

users::100:kkj,test,

...

Why won't my mashine show real names ????

Is this right or wrong 

There are 3 files that controls user and group login...

/etc/group

/etc/passwd

/etc/shadow

and in the passwd file the user real name is listed like this 

test:x:1008:100:tests name:/home/test:/bin/bash

----------

## kkj

Found out myself  :Smile: 

chmod 644 /etc/passwd, group

users couldnt read the passwd,groups files  :Smile: 

----------

