Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I did these in order: adduser --system margo passwd margo groupadd developers usermod -g developers margo groupadd www usermod -a -G www margo But i couldn't su to margo ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    4

    can't su to newly created user

    Hi,

    I did these in order:
    adduser --system margo
    passwd margo
    groupadd developers
    usermod -g developers margo
    groupadd www
    usermod -a -G www margo

    But i couldn't su to margo after that, when i used su, it goes like this:
    # su margo
    # whoami
    root
    #

    than i removed margo from www group, i guessed maybe because of this i couldn't su...

    usermod -G developers margo

    But still i can't su to the user margo... Can you help me pls?

    Thanks in advance
    margo

    ***********************************

    my user data is like this:
    # id margo
    uid=101(margo) gid=103(developers) groups=103(developers)

    and /etc/groups is like this:
    # cat /etc/group
    Code:
    root:x:0:
    daemon:x:1:
    bin:x:2:
    sys:x:3:
    adm:x:4:
    tty:x:5:
    disk:x:6:
    lp:x:7:
    mail:x:8:
    news:x:9:
    uucp:x:10:
    man:x:12:
    proxy:x:13:
    kmem:x:15:
    dialout:x:20:
    fax:x:21:
    voice:x:22:
    cdrom:x:24:
    floppy:x:25:
    tape:x:26:
    sudo:x:27:
    audio:x:29:
    dip:x:30:
    www-data:x:33:
    backup:x:34:
    operator:x:37:
    list:x:38:
    irc:x:39:
    src:x:40:
    gnats:x:41:
    shadow:x:42:
    utmp:x:43:
    video:x:44:
    sasl:x:45:
    plugdev:x:46:
    staff:x:50:
    games:x:60:
    users:x:100:
    nogroup:x:65534:
    crontab:x:101:
    ssh:x:102:
    developers:x:103:margo
    www:x:104:
    laloona:x:1000:
    #

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    what shows up in your auth file
    Code:
    tail /var/log.auth.log

  3. #3
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    seems to have something to do with the --system flag, straight from the man page for adduser
    Code:
       Add a system user
           If called with one non-option argument and the --system option, adduser
           will add a system user. If a user with the same name already exists  in
           the  system uid range (or, if the uid is specified, if a user with that
           uid already exists), adduser will exit with a warning.
    
           adduser will choose the first available UID from  the  range  specified
           for  system users in the configuration file.  The UID can be overridden
           with the --uid option.
    
           By default, system users are placed in the nogroup group.  To place the
           new  system  user  in  an  already  existing  group,  use  the --gid or
           --ingroup options.  To place the new system user in a  new  group  with
           the same ID, use the --group option.
    
           A home directory is created by the same rules as for normal users.  The
           new system user will have the shell /bin/false (unless overridden  with
           the  --shell option), and have logins disabled.  Skeletal configuration
           files are not copied.
    if this is just a personal user, you don't need --system flag

  4. #4
    Just Joined!
    Join Date
    Oct 2008
    Posts
    4
    Lol in "/etc/passwd" the command after connecting for user "margo" was "/bin/false"...

    i changed it to "/bin/sh" and now i can log to user margo...
    But why it is changed to /bin/false" or how could I change it? anybody know?

    margo
    Code:
    :~$ cat /etc/passwd
    root:x:0:0:root:/root:/bin/bash
    daemon:x:1:1:daemon:/usr/sbin:/bin/sh
    bin:x:2:2:bin:/bin:/bin/sh
    sys:x:3:3:sys:/dev:/bin/sh
    sync:x:4:65534:sync:/bin:/bin/sync
    games:x:5:60:games:/usr/games:/bin/sh
    man:x:6:12:man:/var/cache/man:/bin/sh
    lp:x:7:7:lp:/var/spool/lpd:/bin/sh
    mail:x:8:8:mail:/var/mail:/bin/sh
    news:x:9:9:news:/var/spool/news:/bin/sh
    uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
    proxy:x:13:13:proxy:/bin:/bin/sh
    www-data:x:33:33:www-data:/var/www:/bin/sh
    backup:x:34:34:backup:/var/backups:/bin/sh
    list:x:38:38:Mailing List Manager:/var/list:/bin/sh
    irc:x:39:39:ircd:/var/run/ircd:/bin/sh
    gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
    nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
    sshd:x:100:65534::/var/run/sshd:/usr/sbin/nologin
    margo:x:101:103::/home/margo:/bin/false
    laloona:x:1000:1000::/home/laloona:/bin/sh
    :~$
    thanks

    margo

  5. #5
    Just Joined!
    Join Date
    Oct 2008
    Posts
    4
    Hey jledhead,
    there is no auth.log

    # tail /var/log.auth.log
    tail: cannot open `/var/log.auth.log' for reading: No such file or directory

    thanks

  6. #6
    Just Joined!
    Join Date
    Oct 2008
    Posts
    4

    Thanks

    hmmm i think i created that user wrongly with --system attribute...
    man page definitely saying difference of system user...

    thanks for your time, i think i have to search difference between system user and regular user... really didn't know the difference of them

    Thanks again for your help....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •