Bekijk de volledige versie : New ssh user
Hi!
I speek english very strong, and sorry. But i need help.
I have 500gp with newest oleg firmware. I wanna a new ssh user with adduser, but i can't find ssh config file to allow the new user. (/.ssh/config, /etc/ssh/ssh_config i not found) Where can i find? Thank"s your help,
Bye
Zoli
Hi!
Sorry my english.
Add user to system:
list the passwd and groups file:
$ cat /etc/passwd
admin:$1$$GJfQIbxZzFFIM5GwFknwG.:0:0:root:/usr/local/root:/bin/sh
nobody:x:99:99:nobody:/:/sbin/nologin
$ cat /etc/group
root:x:0:admin
nobody:x:99:
edit passwd file (userlist, passwords, etc)
$ nano /etc/passwd
add new line with 7 fields
(Name:Password: UserID:PrincipleGroup:Gecos: HomeDirectory:Shell)
newadmin:X:1:0:root:/usr/local/root:/bin/sh
or
newuser1::1000:100:smbgroup:/opt:/bin/sh
newuser2::1001:100:smbgroup:/opt:/bin/sh
save, and create new group if required (2nd: 1000:100 <- new user and new group id)
$ nano /etc/group
(add new group data:)
smbgroup:X:100:newuser1,newuser2
save, and create new password for new user(s):
$ passwd newuser1
type a password (2x)
etc, if you create more user
if you want to use this user(s) for samba, you create password for samba:
$ smbpasswd newuser1
etc.
warning:
I advise: the /etc/passwd syncronize with /etc/group (user id, group id, etc).
Add /etc/passwd , /etc/group (, /etc/smbpasswd) files to your /etc/local/.files
save to flash:
$ flashfs save
$ flashfs commit
$ flashfs enable
if you create new user, you can login this account to your router, more ssh config not required.
bye, György
ui: magyar vagy?
Hi!
Sorry my english.
Add user to system:
list the passwd and groups file:
$ cat /etc/passwd
admin:$1$$GJfQIbxZzFFIM5GwFknwG.:0:0:root:/usr/local/root:/bin/sh
nobody:x:99:99:nobody:/:/sbin/nologin
$ cat /etc/group
root:x:0:admin
nobody:x:99:
edit passwd file (userlist, passwords, etc)
$ nano /etc/passwd
add new line with 7 fields
(Name:Password: UserID:PrincipleGroup:Gecos: HomeDirectory:Shell)
newadmin:X:1:0:root:/usr/local/root:/bin/sh
or
newuser1::1000:100:smbgroup:/opt:/bin/sh
newuser2::1001:100:smbgroup:/opt:/bin/sh
save, and create new group if required (2nd: 1000:100 <- new user and new group id)
$ nano /etc/group
(add new group data:)
smbgroup:X:100:newuser1,newuser2
save, and create new password for new user(s):
$ passwd newuser1
type a password (2x)
etc, if you create more user
if you want to use this user(s) for samba, you create password for samba:
$ smbpasswd newuser1
etc.
warning:
I advise: the /etc/passwd syncronize with /etc/group (user id, group id, etc).
Add /etc/passwd , /etc/group (, /etc/smbpasswd) files to your /etc/local/.files
save to flash:
$ flashfs save
$ flashfs commit
$ flashfs enable
if you create new user, you can login this account to your router, more ssh config not required.
bye, György
ui: magyar vagy?
Hehe! Jah, magyar. Nekem segítettél sambaba a múlt héten az sctcs-en:D Úgyhogy ezt most akár ott is kérdezhettem volna.:) Köszi, megpróbálom az alapján amit írtál.
Üdv,
Papp Zoli
Elvben minden user képes belépni távolról (ezért nincs külön konfig hozzá) Hogy mit is tud csinálni, azt ez a két file (/etc/passwd és /etc/group) adja meg.
György